Skip to content

Commit

Permalink
revert more irrelevant changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CDFN committed Apr 30, 2024
1 parent 815ffbf commit 85def2b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/frontend/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ initializeNodejs();
const App = () => {
const navRef = useNavigationContainerRef<AppStackList>();
const [permissionsAsked, setPermissionsAsked] = React.useState(false);

React.useEffect(() => {
PermissionsAndroid.requestMultiple([
'android.permission.CAMERA',
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/contexts/IntlContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ function onError(e: Error) {
export function getSupportedLocale(
locale: string,
): keyof typeof languages | undefined {
if (supportedLanguages?.find(lang => lang.locale === locale))
if (supportedLanguages.find(lang => lang.locale === locale))
return locale as keyof typeof languages;
const nonRegionalLocale = locale.split('-')[0];
if (supportedLanguages?.find(({locale}) => locale === nonRegionalLocale))
if (supportedLanguages.find(({locale}) => locale === nonRegionalLocale))
return nonRegionalLocale as keyof typeof languages;
}
1 change: 0 additions & 1 deletion src/frontend/hooks/persistedState/usePersistedLocale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ type LocaleSlice = {
setLocale: (locale: string) => void;
};


const localeSlice: StateCreator<LocaleSlice> = (set, get) => ({
// We can use this non-null assertion with `getLocales()` because, according
// to [the docs][1], the result is "guaranteed to contain at least 1 element."
Expand Down

0 comments on commit 85def2b

Please sign in to comment.