-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update return types to React.JSX.Element for better type co…
…nsistency
- Loading branch information
Showing
136 changed files
with
541 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ import { | |
} from 'react-native' | ||
import { createStyleSheet, useStyles } from 'react-native-unistyles' | ||
|
||
export default function About(): JSX.Element { | ||
export default function About(): React.JSX.Element { | ||
const router = useRouter() | ||
const { styles } = useStyles(stylesheet) | ||
const { t } = useTranslation(['settings']) | ||
|
@@ -97,17 +97,17 @@ export default function About(): JSX.Element { | |
web: 'Mail', | ||
}, | ||
onPress: async () => | ||
await Linking.openURL( | ||
(await Linking.openURL( | ||
'mailto:[email protected]?subject=Feedback%20Neuland-Next' | ||
), | ||
)) as Promise<void>, | ||
}, | ||
{ | ||
title: 'App Website', | ||
icon: linkIcon, | ||
onPress: async () => | ||
await Linking.openURL( | ||
(await Linking.openURL( | ||
`https://next.neuland.app/${i18n.language === 'en' ? 'en/' : ''}` | ||
), | ||
)) as Promise<void>, | ||
}, | ||
{ | ||
title: | ||
|
@@ -173,7 +173,7 @@ export default function About(): JSX.Element { | |
preset: 'done', | ||
}) | ||
} | ||
const isCollected = unlockedAppIcons?.includes('cat') | ||
const isCollected = unlockedAppIcons.includes('cat') | ||
if (!isCollected) { | ||
trackEvent('EasterEgg', { easterEgg: 'aboutLogo' }) | ||
if (Platform.OS === 'ios') addUnlockedAppIcon('cat') | ||
|
@@ -184,19 +184,15 @@ export default function About(): JSX.Element { | |
} | ||
const [pressCount, setPressCount] = useState(0) | ||
const handleWebsitePress = (): void => { | ||
Linking.openURL('https://neuland-ingolstadt.de/').catch((err) => { | ||
console.error('Failed to open URL:', err) | ||
}) | ||
void Linking.openURL('https://neuland-ingolstadt.de/') | ||
} | ||
|
||
const handleContributorsPress = (): void => { | ||
const url = | ||
'https://next.neuland.app/' + | ||
(i18n.language === 'en' ? 'en/' : '') + | ||
'about/contributors' | ||
Linking.openURL(url).catch((err) => { | ||
console.error('Failed to open URL:', err) | ||
}) | ||
void Linking.openURL(url) | ||
} | ||
return ( | ||
<> | ||
|
@@ -215,6 +211,7 @@ export default function About(): JSX.Element { | |
> | ||
<View style={styles.logoIcon}> | ||
<Image | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-require-imports | ||
source={require('@/assets/appIcons/default.png')} | ||
alt="Neuland Next Logo" | ||
style={styles.logoImage} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.