diff options
Diffstat (limited to 'src/components/profile/ProfileHeader.tsx')
-rw-r--r-- | src/components/profile/ProfileHeader.tsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 5d5b695e..665ce0a0 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -1,4 +1,5 @@ -import React, {useLayoutEffect, useRef, useState} from 'react'; +import AsyncStorage from '@react-native-community/async-storage'; +import React, {useEffect, useLayoutEffect, useRef, useState} from 'react'; import {StyleSheet, Text, View} from 'react-native'; import {TouchableOpacity} from 'react-native-gesture-handler'; import {useSelector, useStore} from 'react-redux'; @@ -50,6 +51,17 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ const childRef = useRef(null); const [measure, setMeasure] = useState(null); const [showBadgeTutorial, setShowBadgeTutorial] = useState(false); + + useEffect(() => { + const getBadgeTutorialAsync = async () => { + const res = await AsyncStorage.getItem('hasSeenBadgeTutorial'); + if (res === 'true') { + setShowBadgeTutorial(false); + } + }; + getBadgeTutorialAsync(); + }); + useLayoutEffect(() => { setTimeout(() => { measureStuff(); |