@@ -18,7 +18,6 @@ import Animated, { FadeIn, SlideOutRight } from 'react-native-reanimated';
18
18
import { Button } from '~/components/Button' ;
19
19
import { Chevron } from '~/components/Chevron' ;
20
20
import { FormattedNumber } from '~/components/format/FormattedNumber' ;
21
- import { useToggle } from '~/hooks/useToggle' ;
22
21
23
22
const Query = gql ( /* GraphQL */ `
24
23
fragment GettingStarted_Query on Query @argumentDefinitions(account: { type: "UAddress!" }) {
@@ -44,7 +43,8 @@ const Account = gql(/* GraphQL */ `
44
43
}
45
44
` ) ;
46
45
47
- const dismissedAtom = persistedAtom < boolean > ( 'gettingStartedDismissed' , false ) ;
46
+ const expandedAtom = persistedAtom < boolean > ( 'getting-started.expanded' , false ) ;
47
+ const dismissedAtom = persistedAtom < boolean > ( 'getting-started.dismissed' , false ) ;
48
48
49
49
const AnimatedSurface = Animated . createAnimatedComponent ( Surface ) ;
50
50
@@ -57,13 +57,13 @@ export interface GettingStartedProps {
57
57
}
58
58
59
59
export function GettingStarted ( { style, then, ...props } : GettingStartedProps ) {
60
- const { styles, breakpoint } = useStyles ( stylesheet ) ;
60
+ const { styles } = useStyles ( stylesheet ) ;
61
61
const query = useFragment ( Query , props . query ) ;
62
62
const user = useFragment ( User , props . user ) ;
63
63
const account = useFragment ( Account , props . account ) ;
64
64
65
+ const [ expanded , setExpanded ] = useAtom ( expandedAtom ) ;
65
66
const [ dismissed , setDismissed ] = useAtom ( dismissedAtom ) ;
66
- const [ expanded , toggleExpanded ] = useToggle ( breakpoint === 'expanded' ) ;
67
67
68
68
const suggestions = [
69
69
useLinkGoogleSuggestion ( { user } ) ,
@@ -81,7 +81,7 @@ export function GettingStarted({ style, then, ...props }: GettingStartedProps) {
81
81
82
82
return (
83
83
< AnimatedSurface style = { [ styles . surface , style ] } entering = { FadeIn } exiting = { SlideOutRight } >
84
- < TouchableRipple style = { styles . overview ( expanded ) } onPress = { toggleExpanded } >
84
+ < TouchableRipple style = { styles . overview ( expanded ) } onPress = { ( ) => setExpanded ( ( v ) => ! v ) } >
85
85
< >
86
86
< View style = { styles . headerContainer } >
87
87
< Text variant = "titleSmall" style = { [ styles . text , styles . title ] } >
0 commit comments