all repos — caroster @ 0c7ac8898490dd111666680232744ee0fcfae59e

[Octree] Group carpool to your event https://caroster.io

refactor: 🚨 Fix warnings [skip ci]
Tim Izzo tim@octree.ch
Fri, 03 Feb 2023 17:04:56 +0100
commit

0c7ac8898490dd111666680232744ee0fcfae59e

parent

d5bf219b652f2f60fd39d2f6c78fa9ac42f249d8

M frontend/containers/CreateEvent/store.tsfrontend/containers/CreateEvent/store.ts

@@ -1,4 +1,4 @@

-import create from 'zustand'; +import {create} from 'zustand'; type Event = { name?: string;
M frontend/containers/Languages/Icon.tsxfrontend/containers/Languages/Icon.tsx

@@ -27,33 +27,43 @@ setAnchorEl(null);

onChangeLang(lang); }; - return <> - <Box - position="absolute" - top={displayMenu ? 56 : 0} - right={0} - zIndex={1050} - p={1} - > - <IconButton color="primary" aria-label="Languages" onClick={handleClick} size="large"> - <Icon>language</Icon> - </IconButton> - </Box> - <Menu - id="LanguagesMenu" - anchorEl={anchorEl} - keepMounted - open={Boolean(anchorEl)} - onClose={() => setAnchorEl(null)} - > - {Object.keys(SupportedLocales).map(locale => ( + return ( + <> + <Box + position="absolute" + top={displayMenu ? 56 : 0} + right={0} + zIndex={1050} + p={1} + > + <IconButton + color="primary" + aria-label="Languages" + onClick={handleClick} + size="large" + > + <Icon>language</Icon> + </IconButton> + </Box> + <Menu + id="LanguagesMenu" + anchorEl={anchorEl} + keepMounted + open={Boolean(anchorEl)} + onClose={() => setAnchorEl(null)} + > + {Object.keys(SupportedLocales).map(locale => ( <MenuItem + key={locale} disabled={language === SupportedLocales[locale]} onClick={() => onConfirm(SupportedLocales[locale])} - >{t(`languages.${locale}`)}</MenuItem> + > + {t(`languages.${locale}`)} + </MenuItem> ))} - </Menu> - </>; + </Menu> + </> + ); }; export default withLanguagesSelection(IconLanguageSelection);
M frontend/hooks/useAddToEvents.tsfrontend/hooks/useAddToEvents.ts

@@ -1,6 +1,6 @@

import {useCallback} from 'react'; import {ProfileDocument, useUpdateMeMutation} from '../generated/graphql'; -import create from 'zustand'; +import {create} from 'zustand'; import {persist} from 'zustand/middleware'; import {useSession} from 'next-auth/react';
M frontend/stores/useEventStore.tsfrontend/stores/useEventStore.ts

@@ -1,4 +1,4 @@

-import create from 'zustand'; +import {create} from 'zustand'; import {Event} from '../generated/graphql'; type State = {
M frontend/stores/useOnboardingStore.tsfrontend/stores/useOnboardingStore.ts

@@ -1,4 +1,4 @@

-import create from 'zustand'; +import {create} from 'zustand'; import {persist} from 'zustand/middleware'; const STORAGE_KEY = 'caroster-onboarding';
M frontend/stores/useRedirectUrl.tsfrontend/stores/useRedirectUrl.ts

@@ -1,4 +1,4 @@

-import create from 'zustand'; +import {create} from 'zustand'; import {persist} from 'zustand/middleware'; type State = {
M frontend/stores/useToastStore.tsfrontend/stores/useToastStore.ts

@@ -1,5 +1,5 @@

import {ReactNode} from 'react'; -import create from 'zustand'; +import {create} from 'zustand'; type State = { toast?: string;
M frontend/stores/useTourStore.tsfrontend/stores/useTourStore.ts

@@ -1,4 +1,4 @@

-import create from 'zustand'; +import {create} from 'zustand'; type Tour = { showWelcome: boolean;