-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experiment a way to display HAL wording
- Loading branch information
Showing
12 changed files
with
250 additions
and
88 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
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,2 @@ | ||
export * from "./state"; | ||
export * from "./thunks"; |
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,3 @@ | ||
export const name = "externalDataOrigin"; | ||
|
||
export const reducer = null; |
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,33 @@ | ||
import { ExternalDataOrigin } from "@codegouvfr/sill"; | ||
import type { Thunks } from "core/bootstrap"; | ||
import { createUsecaseContextApi } from "redux-clean-architecture"; | ||
|
||
const { getContext, setContext } = createUsecaseContextApi<{ | ||
externalDataOrigin: ExternalDataOrigin; | ||
}>(); | ||
|
||
export const thunks = { | ||
"getExternalDataOrigin": | ||
() => | ||
(...args): ExternalDataOrigin => { | ||
const [, , rootContext] = args; | ||
|
||
const { externalDataOrigin } = getContext(rootContext); | ||
|
||
return externalDataOrigin; | ||
} | ||
} satisfies Thunks; | ||
|
||
export const protectedThunks = { | ||
"initialize": | ||
() => | ||
async (...args) => { | ||
const [, , rootContext] = args; | ||
|
||
const { sillApi } = rootContext; | ||
|
||
setContext(rootContext, { | ||
"externalDataOrigin": await sillApi.getExternalSoftwareDataOrigin() | ||
}); | ||
} | ||
} satisfies Thunks; |
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
Oops, something went wrong.