Skip to content

Commit

Permalink
Update DrawerContent.tsx and Accordion.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Mar 6, 2024
1 parent a8781fb commit cc0c764
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mobile/components/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Accordion = ({
useNativeDriver: true,
}).start()
}
setOpen(!open)
setOpen((prev) => !prev)
}}
>
<View style={styles.titleContainer}>
Expand Down
6 changes: 3 additions & 3 deletions mobile/components/DrawerContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const DrawerContent = ({
props
}: DrawerContentProps) => {
const navigation = useNavigation<NativeStackNavigationProp<StackParams, keyof StackParams>>()
const [openLanguageMenu, setopenLanguageMenu] = useState(false)
const [openLanguageMenu, setOpenLanguageMenu] = useState(false)
const [language, setLanguage] = useState(drawerLanguage)
const ref = useRef<ScrollView>(null)

Expand Down Expand Up @@ -159,7 +159,7 @@ const DrawerContent = ({
style={styles.languageButton}
hitSlop={15}
onPress={() => {
setopenLanguageMenu(!openLanguageMenu)
setOpenLanguageMenu((prev) => !prev)
}}
>
<MaterialIcons style={styles.languageIcon} name="language" size={24} color="rgba(0, 0, 0, 0.54)" />
Expand All @@ -176,7 +176,7 @@ const DrawerContent = ({
onPress={async () => {
if (lang.code !== language) {
await updateLanguage(lang.code)
setopenLanguageMenu(false)
setOpenLanguageMenu(false)
}
}}
>
Expand Down

0 comments on commit cc0c764

Please sign in to comment.