refactor: 🚨 Fix warnings [skip ci]
Tim Izzo tim@octree.ch
Fri, 03 Feb 2023 17:04:56 +0100
8 files changed,
40 insertions(+),
30 deletions(-)
M
frontend/containers/CreateEvent/store.ts
→
frontend/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.tsx
→
frontend/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.ts
→
frontend/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.ts
→
frontend/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.ts
→
frontend/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.ts
→
frontend/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.ts
→
frontend/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.ts
→
frontend/stores/useTourStore.ts
@@ -1,4 +1,4 @@
-import create from 'zustand'; +import {create} from 'zustand'; type Tour = { showWelcome: boolean;