Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
fix: interval data
Browse files Browse the repository at this point in the history
  • Loading branch information
rwietter committed Jul 10, 2023
1 parent e6c22fb commit bad3afd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
}
},
},

component: {
devServer: {
framework: 'next',
bundler: 'webpack'
}
}
bundler: 'webpack',
},
},
});
8 changes: 4 additions & 4 deletions domains/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import { Header, Sidebar } from '@/shared/components';
import { useScreenshot } from '@/shared/hooks';

interface Props {
clinicalData: QueryProps | undefined;
clinicalData: QueryProps | null;
}

const Dashboard: FC<Props> = ({ clinicalData }): ReactNode => {
const { loading, data, error } = useFetchDataset();
const { getImage, screenshotRef } = useScreenshot();

if (typeof clinicalData === 'undefined' || error instanceof ApolloError) {
return <h1>Erro ao carregar dados</h1>;
if (clinicalData === null || error instanceof ApolloError) {
return <h1 className='text-slate-950'>Erro ao carregar dados</h1>;
}

if (loading) return <DashboardSkeleton />;
Expand Down Expand Up @@ -77,4 +77,4 @@ const Dashboard: FC<Props> = ({ clinicalData }): ReactNode => {
);
};

export default memo(Dashboard);
export { Dashboard };
2 changes: 1 addition & 1 deletion domains/dashboard/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as Dashboard } from './Dashboard';
export { Dashboard } from './Dashboard';
8 changes: 4 additions & 4 deletions pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { type ReactNode } from 'react';
import { ApolloError } from '@apollo/client';

interface PageProps {
data: QueryProps | undefined;
data: QueryProps | null;
}

export default function Page(props: PageProps): ReactNode {
Expand All @@ -22,14 +22,14 @@ export const getStaticProps: GetStaticProps = async (): Promise<
query: clinicalDataQuery,
variables: {
startDate: '2022-01-01T10:00:00Z',
endDate: '2022-12-31T10:00:00Z',
endDate: '2022-02-05T10:00:00Z',
},
});

if (error instanceof ApolloError) {
return {
props: {
data: undefined,
data: null,
},
};
}
Expand All @@ -54,7 +54,7 @@ export const getStaticProps: GetStaticProps = async (): Promise<
} catch (error) {
return {
props: {
data: undefined,
data: null,
},
};
}
Expand Down

0 comments on commit bad3afd

Please sign in to comment.