Prevent initial animation on settings modal

This commit is contained in:
jeffvli
2022-12-09 03:05:48 -08:00
parent 75b7eab2e1
commit 557eaab44c
@@ -1,5 +1,6 @@
import { Box } from '@mantine/core'; import { Box } from '@mantine/core';
import type { Variants } from 'framer-motion'; import type { Variants } from 'framer-motion';
import { AnimatePresence } from 'framer-motion';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import { Tabs } from '/@/components'; import { Tabs } from '/@/components';
import { GeneralTab } from '/@/features/settings/components/general-tab'; import { GeneralTab } from '/@/features/settings/components/general-tab';
@@ -29,6 +30,7 @@ export const Settings = () => {
m={5} m={5}
sx={{ height: '800px', maxHeight: '50vh', overflowX: 'hidden' }} sx={{ height: '800px', maxHeight: '50vh', overflowX: 'hidden' }}
> >
<AnimatePresence initial={false}>
<Tabs <Tabs
keepMounted={false} keepMounted={false}
orientation="vertical" orientation="vertical"
@@ -65,6 +67,7 @@ export const Settings = () => {
</motion.div> </motion.div>
</Tabs.Panel> </Tabs.Panel>
</Tabs> </Tabs>
</AnimatePresence>
</Box> </Box>
); );
}; };