diff options
author | dan <dan.abramov@gmail.com> | 2023-12-06 17:50:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 09:50:06 -0800 |
commit | 7d158f82fb1c82101c3a0cb637f911ac87e8006b (patch) | |
tree | 3cfc4fefc4b7d9c08cc9171e8f4fd2f3941131ae /src/view/shell/NavSignupCard.tsx | |
parent | 8e541d753a0718b85e0a754452c8ffbafb181a81 (diff) | |
download | voidsky-7d158f82fb1c82101c3a0cb637f911ac87e8006b.tar.zst |
Optimize Drawer re-renders (#2108)
Diffstat (limited to 'src/view/shell/NavSignupCard.tsx')
-rw-r--r-- | src/view/shell/NavSignupCard.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/shell/NavSignupCard.tsx b/src/view/shell/NavSignupCard.tsx index 7026dd2a6..11dd7ffee 100644 --- a/src/view/shell/NavSignupCard.tsx +++ b/src/view/shell/NavSignupCard.tsx @@ -11,7 +11,7 @@ import {Button} from '#/view/com/util/forms/Button' import {useLoggedOutViewControls} from '#/state/shell/logged-out' import {useCloseAllActiveElements} from '#/state/util' -export function NavSignupCard() { +let NavSignupCard = ({}: {}): React.ReactNode => { const {_} = useLingui() const pal = usePalette('default') const {setShowLoggedOut} = useLoggedOutViewControls() @@ -59,3 +59,5 @@ export function NavSignupCard() { </View> ) } +NavSignupCard = React.memo(NavSignupCard) +export {NavSignupCard} |