-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add review and first step for metadata
- Loading branch information
Showing
7 changed files
with
66 additions
and
28 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
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 |
---|---|---|
@@ -1,16 +1,27 @@ | ||
import { declareComponentKeys } from 'i18n' | ||
import { useQueryClient } from '@tanstack/react-query' | ||
import { getGetNomenclatureByIdQueryOptions } from 'api/04-nomenclatures' | ||
import { Orchestrator } from 'shared/components/Orchestrator/Orchestrator' | ||
import type { LunaticGetReferentiel } from 'shared/components/Orchestrator/utils/lunaticType' | ||
import { reviewRoute } from './route' | ||
|
||
export function ReviewPage() { | ||
const params = reviewRoute.useParams() | ||
const queryClient = useQueryClient() | ||
|
||
const loaderResults = reviewRoute.useLoaderData() | ||
|
||
console.log({ params, loaderResults }) | ||
const { source, surveyUnitData } = loaderResults | ||
|
||
return <>Review Page</> | ||
} | ||
|
||
const { i18n } = declareComponentKeys()({ ReviewPage }) | ||
const getReferentiel: LunaticGetReferentiel = (name: string) => | ||
queryClient | ||
.ensureQueryData(getGetNomenclatureByIdQueryOptions(name)) | ||
.then((result) => result) | ||
|
||
export type I18n = typeof i18n | ||
return ( | ||
<Orchestrator | ||
mode="review" | ||
source={source} | ||
surveyUnitData={surveyUnitData} | ||
getReferentiel={getReferentiel} | ||
/> | ||
) | ||
} |
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