diff --git a/frontend/src/components/CreateBoard/TipBar.tsx b/frontend/src/components/CreateBoard/TipBar.tsx index ed1857458..58d356706 100644 --- a/frontend/src/components/CreateBoard/TipBar.tsx +++ b/frontend/src/components/CreateBoard/TipBar.tsx @@ -11,16 +11,16 @@ const UnorderedList = styled('ul', { paddingInlineStart: '$26' }); const CreateBoardTipBar = () => ( = ({ strategy }) => { - + Log out diff --git a/frontend/src/hooks/useTeam.tsx b/frontend/src/hooks/useTeam.tsx index 5bd2a10d7..d31d4d68a 100644 --- a/frontend/src/hooks/useTeam.tsx +++ b/frontend/src/hooks/useTeam.tsx @@ -39,24 +39,17 @@ const useTeam = ({ autoFetchTeam = false }: AutoFetchProps): UseTeamType => { }, }); - const fetchTeam = useQuery( - ['team', teamId], - () => { - if (typeof teamId === 'string') return getTeamRequest(teamId); - return undefined; - }, - { - enabled: autoFetchTeam, - refetchOnWindowFocus: false, - onError: () => { - setToastState({ - open: true, - content: 'Error getting the team', - type: ToastStateEnum.ERROR, - }); - }, + const fetchTeam = useQuery(['team', teamId], () => getTeamRequest(teamId), { + enabled: autoFetchTeam, + refetchOnWindowFocus: false, + onError: () => { + setToastState({ + open: true, + content: 'Error getting the team', + type: ToastStateEnum.ERROR, + }); }, - ); + }); const fetchTeamsOfUser = useQuery(['teams'], () => getTeamsOfUser(), { enabled: autoFetchTeam, diff --git a/frontend/src/hooks/useTeamUtils.tsx b/frontend/src/hooks/useTeamUtils.tsx index 0ec5c35c0..569c066ca 100644 --- a/frontend/src/hooks/useTeamUtils.tsx +++ b/frontend/src/hooks/useTeamUtils.tsx @@ -11,7 +11,7 @@ import { ToastStateEnum } from '../utils/enums/toast-types'; type TeamUtilsType = { userId: string; - teamId: string | string[] | undefined; + teamId: string; queryClient: QueryClient; setToastState: SetterOrUpdater<{ open: boolean; type: ToastStateEnum; content: string }>; router: NextRouter; @@ -40,7 +40,7 @@ const useTeamUtils = (): TeamUtilsType => { return { userId, - teamId, + teamId: String(teamId), queryClient, setToastState, router, diff --git a/frontend/src/pages/boards/new.tsx b/frontend/src/pages/boards/new.tsx index b2e7a7995..628ade589 100644 --- a/frontend/src/pages/boards/new.tsx +++ b/frontend/src/pages/boards/new.tsx @@ -192,7 +192,9 @@ const NewBoard: NextPage = () => { > Cancel - + diff --git a/frontend/src/pages/teams/[teamId].tsx b/frontend/src/pages/teams/[teamId].tsx index 1633aaa23..fb7853323 100644 --- a/frontend/src/pages/teams/[teamId].tsx +++ b/frontend/src/pages/teams/[teamId].tsx @@ -65,7 +65,7 @@ const Team = () => { }; export const getServerSideProps: GetServerSideProps = async (context) => { - const { teamId } = context.query; + const teamId = String(context.query.teamId); const queryClient = new QueryClient(); try { @@ -83,6 +83,7 @@ export const getServerSideProps: GetServerSideProps = async (context) => { } return { props: { + key: teamId, dehydratedState: dehydrate(queryClient), }, }; diff --git a/frontend/src/styles/pages/boards/new.styles.tsx b/frontend/src/styles/pages/boards/new.styles.tsx index ea9846efb..daff1a3fb 100644 --- a/frontend/src/styles/pages/boards/new.styles.tsx +++ b/frontend/src/styles/pages/boards/new.styles.tsx @@ -13,9 +13,8 @@ const PageHeader = styled('header', { height: '$92', width: '100%', - position: 'sticky', top: 0, - zIndex: 1, + zIndex: 3, borderBottom: '0.8px solid $primary200', display: 'flex', alignItems: 'center',