-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65efe77
commit 0c8e709
Showing
9 changed files
with
731 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
655 changes: 655 additions & 0 deletions
655
src/components/tax_report_body_all/tax_report_body_all.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import Head from 'next/head'; | ||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; | ||
import { GetServerSideProps } from 'next'; | ||
import { useUserCtx } from '@/contexts/user_context'; | ||
import { DEFAULT_SKELETON_COUNT_FOR_PAGE } from '@/constants/display'; | ||
import { SkeletonList } from '@/components/skeleton/skeleton'; | ||
import TaxReportBodyAll from '@/components/tax_report_body_all/tax_report_body_all'; | ||
|
||
interface ITaxReportPageProps { | ||
reportId: string; | ||
} | ||
|
||
const TaxReportPage = ({ reportId }: ITaxReportPageProps) => { | ||
const { isAuthLoading } = useUserCtx(); | ||
|
||
const displayedBody = isAuthLoading ? ( | ||
<div className="flex h-screen w-full items-center justify-center bg-surface-neutral-main-background"> | ||
<SkeletonList count={DEFAULT_SKELETON_COUNT_FOR_PAGE} /> | ||
</div> | ||
) : ( | ||
<div className="flex w-full flex-1 flex-col"> | ||
<TaxReportBodyAll reportId={reportId} /> | ||
</div> | ||
); | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<meta charSet="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" href="/favicon/favicon.ico" /> | ||
<title>Tax Report</title> | ||
</Head> | ||
|
||
<div className="h-full bg-white font-barlow">{displayedBody}</div> | ||
</> | ||
); | ||
}; | ||
|
||
export const getServerSideProps: GetServerSideProps = async ({ params, locale }) => { | ||
if (!params || !params.reportId || typeof params.reportId !== 'string') { | ||
return { | ||
notFound: true, | ||
}; | ||
} | ||
|
||
return { | ||
props: { | ||
reportId: params.reportId, | ||
...(await serverSideTranslations(locale as string, ['common'])), | ||
}, | ||
}; | ||
}; | ||
|
||
export default TaxReportPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters