Skip to content

Commit

Permalink
remove animation from the settings modal sections
Browse files Browse the repository at this point in the history
  • Loading branch information
peps committed Dec 18, 2024
1 parent cb504ae commit 20f9223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
8 changes: 2 additions & 6 deletions src/containers/floating/Settings/SettingsModal.styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { m } from 'framer-motion';
import styled from 'styled-components';

export const Container = styled.div`
Expand Down Expand Up @@ -58,11 +57,8 @@ export const variants = {
transition,
},
};
export const SectionWrapper = styled(m.div).attrs({
initial: 'initial',
animate: 'visible',
exit: 'exit',
})`

export const SectionWrapper = styled.div`
max-width: 100%;
display: flex;
flex-direction: column;
Expand Down
9 changes: 2 additions & 7 deletions src/containers/floating/Settings/SettingsModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useState } from 'react';
import { AnimatePresence } from 'framer-motion';
import { useTranslation } from 'react-i18next';
import { IoClose } from 'react-icons/io5';

Expand All @@ -23,7 +22,7 @@ import {
ReleaseNotes,
} from './sections';

import { Container, ContentContainer, HeaderContainer, SectionWrapper, variants } from './SettingsModal.styles.ts';
import { Container, ContentContainer, HeaderContainer, SectionWrapper } from './SettingsModal.styles.ts';

const markups = {
general: <GeneralSettings />,
Expand Down Expand Up @@ -65,11 +64,7 @@ export default function SettingsModal() {
</IconButton>
</HeaderContainer>

<AnimatePresence mode="wait">
<SectionWrapper variants={variants} key={activeSection}>
{sectionMarkup}
</SectionWrapper>
</AnimatePresence>
<SectionWrapper key={activeSection}>{sectionMarkup}</SectionWrapper>
</ContentContainer>
</Container>
<RestartDialog />
Expand Down

0 comments on commit 20f9223

Please sign in to comment.