Merge dependencies (#415)

* Bump @chakra-ui/icons from 1.0.3 to 1.0.6

Bumps [@chakra-ui/icons](https://github.com/chakra-ui/chakra-ui) from 1.0.3 to 1.0.6.
- [Release notes](https://github.com/chakra-ui/chakra-ui/releases)
- [Commits](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/icons@1.0.3...@chakra-ui/icons@1.0.6)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump tsdx from 0.13.3 to 0.14.1

Bumps [tsdx](https://github.com/formium/tsdx) from 0.13.3 to 0.14.1.
- [Release notes](https://github.com/formium/tsdx/releases)
- [Commits](https://github.com/formium/tsdx/compare/v0.13.3...v0.14.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump @types/react from 16.9.52 to 17.0.3

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.52 to 17.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump express-graphql from 0.11.0 to 0.12.0

Bumps [express-graphql](https://github.com/graphql/express-graphql) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/graphql/express-graphql/releases)
- [Commits](https://github.com/graphql/express-graphql/compare/v0.11.0...v0.12.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-plugin-simple-import-sort from 5.0.3 to 7.0.0

Bumps [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) from 5.0.3 to 7.0.0.
- [Release notes](https://github.com/lydell/eslint-plugin-simple-import-sort/releases)
- [Changelog](https://github.com/lydell/eslint-plugin-simple-import-sort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lydell/eslint-plugin-simple-import-sort/compare/v5.0.3...v7.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-plugin-jsx-a11y from 6.3.1 to 6.4.1

Bumps [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) from 6.3.1 to 6.4.1.
- [Release notes](https://github.com/evcohen/eslint-plugin-jsx-a11y/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evcohen/eslint-plugin-jsx-a11y/compare/v6.3.1...v6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-plugin-jest from 24.1.3 to 24.3.1

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.1.3 to 24.3.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v24.1.3...v24.3.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-import-resolver-typescript from 2.2.1 to 2.4.0

Bumps [eslint-import-resolver-typescript](https://github.com/alexgorbatchev/eslint-import-resolver-typescript) from 2.2.1 to 2.4.0.
- [Release notes](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/releases)
- [Changelog](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alexgorbatchev/eslint-import-resolver-typescript/compare/v2.2.1...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eslint-config-airbnb-typescript from 9.0.0 to 12.3.1

Bumps [eslint-config-airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript) from 9.0.0 to 12.3.1.
- [Release notes](https://github.com/iamturns/eslint-config-airbnb-typescript/releases)
- [Changelog](https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/iamturns/eslint-config-airbnb-typescript/compare/v9.0.0...v12.3.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix eslint imports

* Fix tslint

* lint!

* lint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Pacien Boisson
2021-03-16 14:45:28 +04:00
committed by GitHub
parent c276f6a057
commit 8c99b5df50
45 changed files with 1952 additions and 1174 deletions

View File

@@ -26,7 +26,7 @@
"discord.js": "^12.5.1",
"ethers": "4.0.48",
"express": "4.17.1",
"express-graphql": "0.11.0",
"express-graphql": "0.12.0",
"graphql": "15.4.0",
"graphql-request": "3.2.0",
"graphql-tag": "2.11.0",

View File

@@ -7,7 +7,7 @@ import { updateDiscordRole } from './updateDiscordRole';
const TRIGGERS = {
fetchBoxVerifiedAccounts,
'player_rank_updated': updateDiscordRole
'player_rank_updated': updateDiscordRole,
};
export const triggerHandler = async (

View File

@@ -15,12 +15,12 @@ export interface UpdateRole {
export const updateDiscordRole = async (
payload: TriggerPayload<Player>,
) => {
const {old: oldPlayer, new: newPlayer} = payload.event.data;
const { old: oldPlayer, new: newPlayer } = payload.event.data;
try {
if (newPlayer == null) return;
const getPlayerResponse = await client.GetPlayer({playerId: newPlayer.id});
const getPlayerResponse = await client.GetPlayer({ playerId: newPlayer.id });
const discordPlayerAccount = getPlayerResponse.player_by_pk?.Accounts?.find(a => a.type === AccountType_Enum.Discord);
if (discordPlayerAccount?.identifier == null) return;
@@ -29,7 +29,7 @@ export const updateDiscordRole = async (
if (newRank == null) return;
// look up guild by guildname = 'metagame' (for now),
const getGuildResponse = await client.GetGuild({guildname: 'metafam'});
const getGuildResponse = await client.GetGuild({ guildname: 'metafam' });
const discordGuildAccount = getGuildResponse.guild[0]?.guild_accounts?.find(a => a.type === AccountType_Enum.Discord);
if (discordGuildAccount == null) return;

View File

@@ -1,4 +1,4 @@
import {ethers} from "ethers";
import { ethers } from "ethers";
import { CONFIG } from '../config';
import ERC20_ABI from './abis/ERC20.json';

View File

@@ -5,7 +5,7 @@ export const RANKS = [
PlayerRank_Enum.Platinum,
PlayerRank_Enum.Gold,
PlayerRank_Enum.Silver,
PlayerRank_Enum.Bronze
PlayerRank_Enum.Bronze,
]
export const PLAYERS_PER_RANK = [7, 7, 7, 14, 21];

View File

@@ -24,7 +24,7 @@
"react": ">=16"
},
"dependencies": {
"@chakra-ui/icons": "1.0.3",
"@chakra-ui/icons": "1.0.6",
"@chakra-ui/react": "1.1.5",
"@chakra-ui/theme-tools": "1.0.3",
"@emotion/react": "11.1.4",

View File

@@ -1,2 +1,2 @@
export { Icon3box } from './Icon3box';
export { BrightIdIcon } from './BrightIdIcon';
export { Icon3box } from './Icon3box';

View File

@@ -1,28 +1,47 @@
export { BoxedNextImage } from './BoxedNextImage';
export { BrightIdIcon, Icon3box } from './icons';
export { LoadingState } from './LoadingState';
export { MetaBox } from './MetaBox';
export { MetaButton } from './MetaButton';
export { MetaHeading } from './MetaHeading';
export { MetaTag } from './MetaTag';
export { MetaTile, MetaTileBody, MetaTileHeader } from './MetaTile';
export { ResponsiveText } from './ResponsiveText';
export { SelectSearch, selectStyles } from './SelectSearch';
export { SelectTimeZone } from './SelectTimeZone';
export { theme as MetaTheme } from './theme';
export { H1, P } from './typography';
export { EmailIcon } from '@chakra-ui/icons';
export {
Avatar,
Badge,
Box,
FlexProps,
Button,
ButtonProps,
ButtonGroup,
CSSReset,
ChakraProvider,
ButtonProps,
Center,
ChakraProvider,
Container,
CSSReset,
Divider,
Flex,
FlexProps,
Grid,
Heading,
HStack,
Icon,
IconButton,
Image,
InputGroup,
InputRightAddon,
InputLeftElement,
Input,
InputGroup,
InputLeftElement,
InputRightAddon,
Link,
List,
Modal,
ModalCloseButton,
ModalContent,
ModalOverlay,
Select,
SimpleGrid,
Skeleton,
@@ -31,30 +50,10 @@ export {
Stack,
Text,
Tooltip,
Wrap,
WrapItem,
HStack,
VStack,
useDisclosure,
useTheme,
useToast,
Modal,
ModalContent,
ModalCloseButton,
ModalOverlay,
useDisclosure,
VStack,
Wrap,
WrapItem,
} from '@chakra-ui/react';
export { theme as MetaTheme } from './theme';
export { Icon3box, BrightIdIcon } from './icons';
export { EmailIcon } from '@chakra-ui/icons';
export { MetaHeading } from './MetaHeading';
export { MetaButton } from './MetaButton';
export { MetaBox } from './MetaBox';
export { LoadingState } from './LoadingState';
export { MetaTag } from './MetaTag';
export { H1, P } from './typography';
export { ResponsiveText } from './ResponsiveText';
export { SelectSearch, selectStyles } from './SelectSearch';
export { SelectTimeZone } from './SelectTimeZone';
export { BoxedNextImage } from './BoxedNextImage';
export { MetaTile, MetaTileHeader, MetaTileBody } from './MetaTile';

View File

@@ -40,7 +40,7 @@ export const CircleComponent: FC<CircleProps> = ({
popup,
}) => {
const [, drag] = useDrag({
item: { id, type, left, top }
item: { id, type, left, top },
})
if (selectedItem === id && resizingItem) {
@@ -111,5 +111,5 @@ export const Circle = connect(
mouseX: state.mouseX,
mouseY: state.mouseY,
})
}),
)(CircleComponent);

View File

@@ -22,7 +22,7 @@ export const ContainerComponent: FC<ContainerProps> = ({ dispatch, items }) => {
const top = Math.round(item.top + delta.y);
dispatch({ type: 'UPDATE_POSITION', object: item.type, index: item.id, left, top })
}
},
});
return(
@@ -98,5 +98,5 @@ export const ContainerComponent: FC<ContainerProps> = ({ dispatch, items }) => {
export const Container = connect(
(state: any) => ({
items: state.items,
})
}),
)(ContainerComponent);

View File

@@ -42,7 +42,7 @@ export const ImageComponent: FC<ImageProps> = ({
popup,
}) => {
const [, drag] = useDrag({
item: { id, type, left, top }
item: { id, type, left, top },
})
if (selectedItem === id && resizingItem) {
@@ -111,5 +111,5 @@ export const Image = connect(
mouseX: state.mouseX,
mouseY: state.mouseY,
})
}),
)(ImageComponent);

View File

@@ -114,5 +114,5 @@ export const Line = connect(
menuY: state.menuY,
mouseX: state.mouseX,
mouseY: state.mouseY,
})
}),
)(LineComponent);

View File

@@ -10,7 +10,7 @@ export interface LoadingInterface {
export const LoadingComponent: FC<LoadingInterface> = ({ loading }) => {
return(
<LoadingContainer style={{ opacity: loading ? 1 : 0}}>
<LoadingContainer style={{ opacity: loading ? 1 : 0 }}>
<CircularProgress isIndeterminate color="blue" size="92px" />
</LoadingContainer>
);
@@ -19,5 +19,5 @@ export const LoadingComponent: FC<LoadingInterface> = ({ loading }) => {
export const Loading = connect(
(state: any) => ({
loading: state.loading,
})
}),
)(LoadingComponent);

View File

@@ -19,7 +19,7 @@ export interface MenuProps {
export const MenuComponent: FC<MenuProps> = ({ dispatch, menu, menuType, selectedItem, menuX, menuY, urlText, popupText }) => {
if (menuType === 'normal') {
return(
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit': 'none' }}>
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit' : 'none' }}>
<ButtonGroup spacing={4}>
<Button
size="sm"
@@ -80,7 +80,7 @@ export const MenuComponent: FC<MenuProps> = ({ dispatch, menu, menuType, selecte
)
} if (menuType === 'SQUARE' || menuType === 'CIRCLE' || menuType === 'IMAGE') {
return(
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit': 'none' }}>
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit' : 'none' }}>
<ButtonGroup spacing={4}>
<Button
size="sm"
@@ -126,7 +126,7 @@ export const MenuComponent: FC<MenuProps> = ({ dispatch, menu, menuType, selecte
)
} if (menuType === 'LINE') {
return(
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit': 'none' }}>
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit' : 'none' }}>
<ButtonGroup spacing={4}>
<Button
size="sm"
@@ -142,7 +142,7 @@ export const MenuComponent: FC<MenuProps> = ({ dispatch, menu, menuType, selecte
)
} if (menuType === 'url') {
return(
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit': 'none' }} data-type="no-left-click">
<MenuContainer style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit' : 'none' }} data-type="no-left-click">
<input
data-type="no-left-click"
type="text"
@@ -167,7 +167,7 @@ export const MenuComponent: FC<MenuProps> = ({ dispatch, menu, menuType, selecte
return(
<MenuContainer
className="textarea"
style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit': 'none' }}
style={{ left: menuX, top: menuY, opacity: menu ? 1 : 0, pointerEvents: menu ? 'inherit' : 'none' }}
data-type="no-left-click">
<textarea
data-type="no-left-click"
@@ -201,5 +201,5 @@ export const Menu = connect(
menuY: state.menuY,
urlText: state.urlText,
popupText: state.popupText,
})
}),
)(MenuComponent);

View File

@@ -39,5 +39,5 @@ export const Popup = connect(
(state: any) => ({
renderedPopupText: state.renderedPopupText,
popupActive: state.popupActive,
})
}),
)(PopupComponent);

View File

@@ -42,7 +42,7 @@ export const SquareComponent: FC<SquareProps> = ({
popup,
}) => {
const [, drag] = useDrag({
item: { id, type, left, top }
item: { id, type, left, top },
})
if (selectedItem === id && resizingItem) {
@@ -107,5 +107,5 @@ export const Square = connect(
mouseX: state.mouseX,
mouseY: state.mouseY,
})
}),
)(SquareComponent);

View File

@@ -52,5 +52,5 @@ export const ThreeBox = connect(
ethAccounts: state.ethAccounts,
activeSpace: state.activeSpace,
items: state.items,
})
}),
)(ThreeBoxComponent);

View File

@@ -25,8 +25,8 @@ class WrappedApp extends App<AppProps> {
...(Component.getInitialProps
? await Component.getInitialProps(ctx)
: {}),
appProp: ctx.pathname
}
appProp: ctx.pathname,
},
};
};
@@ -45,7 +45,7 @@ const WrappedAppRedux = connect(
(state: any) => ({
menu: state.menu,
activeSpace: state.activeSpace,
})
}),
)(WrappedApp);
export default wrapper.withRedux(WrappedAppRedux);

View File

@@ -29,7 +29,7 @@ export const Home: FC<HomeProps> = ({ dispatch, menu, activeSpace }) => {
x: e.pageX,
y: e.pageY,
menuType: e.target.getAttribute('data-type'),
id: e.target.getAttribute('data-id')
id: e.target.getAttribute('data-id'),
})
}
}
@@ -59,5 +59,5 @@ export default connect(
(state: any) => ({
menu: state.menu,
activeSpace: state.activeSpace,
})
}),
)(Home);

View File

@@ -188,7 +188,7 @@ export function reducer(state: State = initialState, action: AnyAction): State {
};
}
return item;
})
}),
};
case 'UPDATE_POSITION':
return {
@@ -202,7 +202,7 @@ export function reducer(state: State = initialState, action: AnyAction): State {
};
}
return item;
})
}),
};
case 'UPDATE_VECTOR':
return {
@@ -233,7 +233,7 @@ export function reducer(state: State = initialState, action: AnyAction): State {
};
}
return item;
})
}),
}
}
return { ...state };
@@ -251,4 +251,4 @@ export type RootState = ReturnType<typeof reducer>;
export const makeStore: MakeStore<State> = (context: Context) => createStore(reducer, initialState, compose(applyMiddleware(thunk)));
export const wrapper = createWrapper<State>(makeStore, {debug: true});
export const wrapper = createWrapper<State>(makeStore, { debug: true });

View File

@@ -1,4 +1,4 @@
export * as did from './did';
export * from './arrayHelpers';
export * from './promiseHelpers';
export * as did from './did';
export * as numbers from './numbers';
export * from './promiseHelpers';

View File

@@ -20,11 +20,11 @@ export type SetupAvailabilityProps = {
}
export const SetupAvailability: React.FC<SetupAvailabilityProps> = ({
availability, setAvailability
availability, setAvailability,
}) => {
const {
onNextPress,
nextButtonLabel
nextButtonLabel,
} = useSetupFlow();
const [invalid, setInvalid] = useState(false);
@@ -44,8 +44,8 @@ export const SetupAvailability: React.FC<SetupAvailabilityProps> = ({
const { error } = await updateProfile({
playerId: user.id,
input: {
availability_hours: Number(availability)
}
availability_hours: Number(availability),
},
});
if (error) {

View File

@@ -20,11 +20,11 @@ export type SetupMembershipsProps = {
>;
}
export const SetupMemberships: React.FC<SetupMembershipsProps> = ({memberships}) => {
export const SetupMemberships: React.FC<SetupMembershipsProps> = ({ memberships }) => {
const { isConnected } = useWeb3();
const {
onNextPress,
nextButtonLabel
nextButtonLabel,
} = useSetupFlow();
return (

View File

@@ -24,7 +24,7 @@ export type SetupPersonalityTypeProps = {
}
export const SetupPersonalityType: React.FC<SetupPersonalityTypeProps> = ({
personalityTypeChoices, personalityType, setPersonalityType
personalityTypeChoices, personalityType, setPersonalityType,
}) => {
const {
onNextPress,
@@ -42,8 +42,8 @@ export const SetupPersonalityType: React.FC<SetupPersonalityTypeProps> = ({
const { error } = await updateAboutYou({
playerId: user.id,
input: {
enneagram: personalityType?.name
}
enneagram: personalityType?.name,
},
});
if (error) {

View File

@@ -18,11 +18,11 @@ export type SetupPlayerTypeProps = {
}
export const SetupPlayerType: React.FC<SetupPlayerTypeProps> = ({
playerTypeChoices, playerType, setPlayerType
playerTypeChoices, playerType, setPlayerType,
}) => {
const {
onNextPress,
nextButtonLabel
nextButtonLabel,
} = useSetupFlow();
const { user } = useUser({ redirectTo: '/' });
const toast = useToast();

View File

@@ -3,8 +3,8 @@ import { SetupHeader } from 'components/Setup/SetupHeader';
import { useSetupFlow } from 'contexts/SetupContext';
import React from 'react';
export const SetupProfile: React.FC = ({children}) => {
const {options, stepIndex} = useSetupFlow();
export const SetupProfile: React.FC = ({ children }) => {
const { options, stepIndex } = useSetupFlow();
return (
<PageContainer>

View File

@@ -15,10 +15,10 @@ export type SetupTimezoneProps = {
setTimeZone: React.Dispatch<React.SetStateAction<string>>;
}
export const SetupTimeZone: React.FC<SetupTimezoneProps> = ({timeZone, setTimeZone}) => {
export const SetupTimeZone: React.FC<SetupTimezoneProps> = ({ timeZone, setTimeZone }) => {
const {
onNextPress,
nextButtonLabel
nextButtonLabel,
} = useSetupFlow();
const { user } = useUser({ redirectTo: '/' });
const toast = useToast();
@@ -31,8 +31,8 @@ export const SetupTimeZone: React.FC<SetupTimezoneProps> = ({timeZone, setTimeZo
const { error } = await updateProfile({
playerId: user.id,
input: {
timezone: timeZone
}
timezone: timeZone,
},
});
if (error) {

View File

@@ -10,10 +10,10 @@ export type SetupUsernameProps = {
setUsername: React.Dispatch<React.SetStateAction<string>>;
}
export const SetupUsername: React.FC<SetupUsernameProps> = ({username, setUsername}) => {
export const SetupUsername: React.FC<SetupUsernameProps> = ({ username, setUsername }) => {
const {
onNextPress,
nextButtonLabel
nextButtonLabel,
} = useSetupFlow();
const { user } = useUser({ redirectTo: '/' });
const toast = useToast();

View File

@@ -20,7 +20,7 @@ export const SetupContext = React.createContext<SetupContextType>({
nextButtonLabel: 'Next Step',
});
export const SetupContextProvider: React.FC = ({children}) => {
export const SetupContextProvider: React.FC = ({ children }) => {
const options = useMemo(() => {
return new SetupOptions();
}, []);

View File

@@ -12,7 +12,7 @@
"prepare": "yarn generate"
},
"dependencies": {
"@chakra-ui/icons": "1.0.3",
"@chakra-ui/icons": "1.0.6",
"@metafam/ds": "0.1.0",
"@metafam/utils": "1.0.0",
"@walletconnect/web3-provider": "1.3.1",

View File

@@ -4,8 +4,8 @@ import { PageHeader } from 'components/PageHeader';
import { CONFIG } from 'config';
import { Web3ContextProvider } from 'contexts/Web3Context';
import { getTokenFromStore } from 'lib/auth';
import { withUrqlClient, WithUrqlProps } from 'next-urql';
import Head from 'next/head';
import { withUrqlClient, WithUrqlProps } from 'next-urql';
import React from 'react';
const app: React.FC<WithUrqlProps> = ({ pageProps, resetUrqlClient, Component }) => {

View File

@@ -185,8 +185,8 @@ export const getStaticProps = async (
return {
redirect: {
desination: '/',
permanent: false
}
permanent: false,
},
}
}
@@ -197,8 +197,8 @@ export const getStaticProps = async (
return {
redirect: {
destination: `/player/${username.toLowerCase()}`,
permanent: false
}
permanent: false,
},
}
}
}

View File

@@ -8,8 +8,8 @@ import React, { useState } from 'react';
export const getStaticProps = async () => {
return {
props: {
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};
@@ -21,7 +21,7 @@ const AvailabilitySetup: React.FC<DefaultSetupProps> = () => {
const { user } = useUser({ redirectTo: '/' });
if (user?.player) {
const {player} = user;
const { player } = user;
if (player.availability_hours && !availability) {
setAvailability(player.availability_hours.toString());
}

View File

@@ -7,8 +7,8 @@ import React from 'react';
export const getStaticProps = async () => {
return {
props: {
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};

View File

@@ -10,8 +10,8 @@ import React, { useState } from 'react';
export const getStaticProps = async () => {
return {
props: {
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};

View File

@@ -13,8 +13,8 @@ export const getStaticProps = async () => {
return {
props: {
personalityTypeChoices,
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};
@@ -22,12 +22,12 @@ type Props = InferGetStaticPropsType<typeof getStaticProps>;
const PersonalityTypeSetup: React.FC<Props> = (props) => {
const {personalityTypeChoices} = props;
const { personalityTypeChoices } = props;
const [personalityType, setPersonalityType] = useState<PersonalityType>();
const { user } = useUser({ redirectTo: '/' });
if (user?.player) {
const {player} = user;
const { player } = user;
if (player.EnneagramType && !personalityType) {
setPersonalityType(PersonalityTypes[player.EnneagramType.name]);
}

View File

@@ -13,20 +13,20 @@ export const getStaticProps = async () => {
return {
props: {
playerTypeChoices,
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};
type Props = InferGetStaticPropsType<typeof getStaticProps>;
const PlayerTypeSetup: React.FC<Props> = (props) => {
const {playerTypeChoices} = props;
const { playerTypeChoices } = props;
const [playerType, setPlayerType] = useState<Player_Type>();
const { user } = useUser({ redirectTo: '/' });
if (user?.player) {
const {player} = user;
const { player } = user;
if (player.playerType && !playerType) {
setPlayerType(player.playerType);
}

View File

@@ -14,7 +14,7 @@ export const getStaticProps = async () => {
return {
props: {
skillChoices,
hideAppDrawer: true
hideAppDrawer: true,
},
};
};
@@ -22,12 +22,12 @@ export const getStaticProps = async () => {
type Props = InferGetStaticPropsType<typeof getStaticProps>;
const SkillsSetup: React.FC<Props> = (props) => {
const {skillChoices} = props;
const { skillChoices } = props;
const [skills, setSkills] = useState<Array<SkillOption>>([]);
const { user } = useUser({ redirectTo: '/' });
if (user?.player) {
const {player} = user;
const { player } = user;
if (
player.Player_Skills &&
player.Player_Skills.length > 0 &&

View File

@@ -8,8 +8,8 @@ import React, { useState } from 'react';
export const getStaticProps = async () => {
return {
props: {
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};
@@ -21,7 +21,7 @@ const TimeZoneSetup: React.FC<DefaultSetupProps> = () => {
const { user } = useUser({ redirectTo: '/' });
if (user?.player) {
const {player} = user;
const { player } = user;
if (player.timezone && !timeZone) {
setTimeZone(player.timezone);
}

View File

@@ -8,8 +8,8 @@ import React, { useState } from 'react';
export const getStaticProps = async () => {
return {
props: {
hideAppDrawer: true
}
hideAppDrawer: true,
},
};
};
@@ -21,7 +21,7 @@ const UsernameSetup: React.FC<DefaultSetupProps> = () => {
const { user } = useUser({ redirectTo: '/' });
if (user?.player) {
const {player} = user;
const { player } = user;
if (
player.username &&
player.username.toLowerCase() !== address?.toLowerCase() &&

View File

@@ -17,7 +17,7 @@ export const getPlayerTimeZoneDisplay = (player: PlayerFragmentFragment): TimeZo
tzLabel = timeZone.isDST()
? tzDisplay.daylight.abbrev
: tzDisplay.standard.abbrev;
const {offset} = timeZone.timezone().current;
const { offset } = timeZone.timezone().current;
if (offset > 0) {
offsetLabel = `(GMT +${offset})`;
} else if (offset < 0) {
@@ -30,7 +30,7 @@ export const getPlayerTimeZoneDisplay = (player: PlayerFragmentFragment): TimeZo
return {
timeZone: tzLabel,
offset: offsetLabel
offset: offsetLabel,
}
}

View File

@@ -16,14 +16,14 @@ export class SetupOptions {
sections: SetupSection[] = [
{
label: 'About You',
title: { base: 'About You', sm: '1. About You' }
title: { base: 'About You', sm: '1. About You' },
}, {
label: 'Profile',
title: {
base: 'Profile',
sm: '2. Profile',
lg: '2. Professional Profile',
}
},
}, {
label: 'Start Playing',
title: {
@@ -31,43 +31,43 @@ export class SetupOptions {
sm: '3. Play',
md: '3. Start Playing',
},
}
},
];
steps: SetupStep[] = [
{
label: 'Username',
slug: 'username',
sectionIndex: 0
sectionIndex: 0,
}, {
label: 'Personality Type',
slug: 'personalityType',
sectionIndex: 0
sectionIndex: 0,
}, {
label: 'Player Type',
slug: 'playerType',
sectionIndex: 0
sectionIndex: 0,
}, {
label: 'Skills',
slug: 'skills',
sectionIndex: 1
sectionIndex: 1,
}, {
label: 'Availability',
slug: 'availability',
sectionIndex: 1
sectionIndex: 1,
}, {
label: 'Time Zone',
slug: 'timeZone',
sectionIndex: 1
sectionIndex: 1,
}, {
label: 'Memberships',
slug: 'memberships',
sectionIndex: 1
sectionIndex: 1,
}, {
label: 'Start Playing',
slug: 'complete',
sectionIndex: 2
}
sectionIndex: 2,
},
]
stepIndexMatchingSlug(slug: string | null): number {