mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:53:05 +00:00
B106 — optional home search chrome read for wizard unit tests
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
This commit is contained in:
parent
84365ddf54
commit
50aa83ea8f
1 changed files with 5 additions and 3 deletions
|
|
@ -36,6 +36,11 @@ export const CampaignHomeSearchChromeProvider = ({ children }: { children: React
|
|||
)
|
||||
}
|
||||
|
||||
export const useCampaignHomeSearchChrome = (): CampaignHomeSearchChromeState | null => {
|
||||
const value = useContext(CampaignHomeSearchChromeContext)
|
||||
return value?.chrome ?? null
|
||||
}
|
||||
|
||||
const useCampaignHomeSearchChromeContext = (): CampaignHomeSearchChromeContextValue => {
|
||||
const value = useContext(CampaignHomeSearchChromeContext)
|
||||
if (!value) {
|
||||
|
|
@ -44,9 +49,6 @@ const useCampaignHomeSearchChromeContext = (): CampaignHomeSearchChromeContextVa
|
|||
return value
|
||||
}
|
||||
|
||||
export const useCampaignHomeSearchChrome = (): CampaignHomeSearchChromeState | null =>
|
||||
useCampaignHomeSearchChromeContext().chrome
|
||||
|
||||
export const useSetCampaignHomeSearchChrome = (
|
||||
state: CampaignHomeSearchChromeState | null,
|
||||
): void => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue