Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Seroxdesign committed Feb 16, 2024
1 parent f14fbfe commit 560ad9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const PageContainer = lazy(() => import('components/Container'));
const DashboardPage: React.FC = () => {
const [{ fetching: persisting }, saveLayoutData] = useUpdateLayout();
const { user: player } = useUser();

const savedLayoutData = useMemo<LayoutData>(
() =>
player?.dashboardLayout
Expand All @@ -28,11 +29,10 @@ const DashboardPage: React.FC = () => {
const persistLayoutData = useCallback(
async (layoutData: LayoutData) => {
if (player) {
const { error } = await saveLayoutData({
const { error, data } = await saveLayoutData({
playerId: player.id,
dashboardLayout: JSON.stringify(layoutData),
});

if (error) throw error;
}
},
Expand Down

0 comments on commit 560ad9f

Please sign in to comment.