Optimize Drawer re-renders (#2108)

This commit is contained in:
dan 2023-12-06 17:50:06 +00:00 committed by GitHub
parent 8e541d753a
commit 7d158f82fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 315 additions and 185 deletions

View file

@ -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}