diff options
author | muhamedsalih-tw <104364298+muhamedsalih-tw@users.noreply.github.com> | 2022-10-27 07:13:47 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 01:43:47 +0000 |
commit | 81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48 (patch) | |
tree | dfa7c08cb54fb81b7d2e788d350de52c2ebd05d2 /src/components/ui/effects | |
parent | 6.2.1-nightly.30 [skip ci] (diff) | |
download | ferdium-app-81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48.tar.gz ferdium-app-81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48.tar.zst ferdium-app-81c43ecc3d17e0dbf7ad1d949b6d977f2c65bd48.zip |
fix: 'failed prop' warning in QuickSwitchModal, SettingsNavigation, SettingsWindow and Recipe component tree (#713)
* chore: turn off eslint rule @typescript-eslint/no-useless-constructor to initialize dynamic props & state
Co-authored-by: Muhamed <>
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/components/ui/effects')
-rw-r--r-- | src/components/ui/effects/Appear.tsx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/components/ui/effects/Appear.tsx b/src/components/ui/effects/Appear.tsx index 416017c83..bf097b6a6 100644 --- a/src/components/ui/effects/Appear.tsx +++ b/src/components/ui/effects/Appear.tsx | |||
@@ -1,16 +1,16 @@ | |||
1 | import { ReactNode, useEffect, useState } from 'react'; | 1 | import { ReactElement, ReactNode, useEffect, useState } from 'react'; |
2 | import { CSSTransitionGroup } from 'react-transition-group'; | 2 | import { CSSTransitionGroup } from 'react-transition-group'; |
3 | 3 | ||
4 | type Props = { | 4 | interface IProps { |
5 | children: ReactNode; | 5 | children: ReactNode; |
6 | transitionName: string; | 6 | transitionName?: string; |
7 | className?: string; | 7 | className?: string; |
8 | }; | 8 | } |
9 | const Appear = ({ | 9 | const Appear = ({ |
10 | children, | 10 | children, |
11 | transitionName = 'fadeIn', | 11 | transitionName = 'fadeIn', |
12 | className = '', | 12 | className = '', |
13 | }: Props) => { | 13 | }: IProps): ReactElement | null => { |
14 | const [mounted, setMounted] = useState(false); | 14 | const [mounted, setMounted] = useState(false); |
15 | 15 | ||
16 | useEffect(() => { | 16 | useEffect(() => { |
@@ -36,8 +36,4 @@ const Appear = ({ | |||
36 | ); | 36 | ); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | Appear.defaultProps = { | ||
40 | className: '', | ||
41 | }; | ||
42 | |||
43 | export default Appear; | 39 | export default Appear; |