Skip to content

Commit

Permalink
Update Dashboard.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
tcaiger committed Oct 31, 2024
1 parent 0cc402a commit 52931e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/tupaia-web/src/features/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2017 - 2023 Beyond Essential Systems Pty Ltd
*/

import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import styled from 'styled-components';
import { useParams } from 'react-router-dom';
import { Typography } from '@material-ui/core';
Expand Down Expand Up @@ -110,7 +110,7 @@ const DashboardItemsWrapper = styled.div<{

export const Dashboard = () => {
const { projectCode, entityCode } = useParams();
const { data: project, isLoading: isLoadingProject } = useProject(projectCode);
const { data: project } = useProject(projectCode);
const { data: user } = useUser();
const { mutate: updateUser } = useEditUser();

Expand All @@ -119,7 +119,6 @@ export const Dashboard = () => {
updateUser({ projectId: project?.id });
}
}, [project?.code, user?.project?.code]);
const { data: project } = useProject(projectCode);

const { activeDashboard } = useDashboard();
const { isLoading: isLoadingDashboards } = useDashboards(projectCode, entityCode);
Expand Down

0 comments on commit 52931e3

Please sign in to comment.