diff --git a/packages/web/pages/dashboard.tsx b/packages/web/pages/dashboard.tsx index 3b3e82e92..213222849 100644 --- a/packages/web/pages/dashboard.tsx +++ b/packages/web/pages/dashboard.tsx @@ -1,5 +1,3 @@ -import { Maybe } from '@metafam/utils'; -import { ConnectedPage } from 'components/ConnectedPage'; import { PageContainer } from 'components/Container'; import { ALL_BOXES, @@ -11,19 +9,13 @@ import { Player, useUpdatePlayerDashboardLayoutMutation as useUpdateLayout, } from 'graphql/autogen/types'; +import { useUser } from 'lib/hooks'; import React, { useCallback, useMemo } from 'react'; import { DisplayOutput, LayoutData } from 'utils/boxTypes'; -const ConnectedDashboardPage: React.FC = () => ( - -); - -export default ConnectedDashboardPage; - -type Props = { player: Maybe }; - -export const DashboardPage: React.FC = ({ player }) => { +const DashboardPage: React.FC = () => { const [{ fetching: persisting }, saveLayoutData] = useUpdateLayout(); + const { user: player } = useUser(); const savedLayoutData = useMemo( () => player?.dashboardLayout @@ -46,14 +38,12 @@ export const DashboardPage: React.FC = ({ player }) => { [saveLayoutData, player], ); - if (!player) return null; - return ( = ({ player }) => { ); }; + +export default DashboardPage;