forked from theirc/signpost-template
-
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.
chore(deps): bump @ircsignpost/signpost-base from 16.8.0 to 16.10.0 (#55
) Bumps [@ircsignpost/signpost-base](https://github.com/unitedforukraine/signpost-base) from 16.8.0 to 16.10.0. - [Commits](https://github.com/unitedforukraine/signpost-base/commits) --- updated-dependencies: - dependency-name: "@ircsignpost/signpost-base" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8420442
commit b613642
Showing
9 changed files
with
81 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { ReactNode, createContext, useContext, useState } from 'react'; | ||
|
||
interface BreadcrumbsContextProps { | ||
breadcrumbs: { url: string; title: string }; | ||
setBreadcrumbs: React.Dispatch< | ||
React.SetStateAction<{ url: string; title: string }> | ||
>; | ||
} | ||
|
||
const BreadcrumbsContext = createContext<BreadcrumbsContextProps | undefined>( | ||
undefined | ||
); | ||
|
||
export const BreadcrumbsProvider: React.FC<{ children: ReactNode }> = ({ | ||
children, | ||
}) => { | ||
const [breadcrumbs, setBreadcrumbs] = useState<{ | ||
url: string; | ||
title: string; | ||
}>({ url: '', title: '' }); | ||
|
||
return ( | ||
<BreadcrumbsContext.Provider value={{ breadcrumbs, setBreadcrumbs }}> | ||
{children} | ||
</BreadcrumbsContext.Provider> | ||
); | ||
}; | ||
|
||
export const useBreadcrumbs = () => { | ||
const context = useContext(BreadcrumbsContext); | ||
|
||
if (!context) { | ||
throw new Error('useBreadcrumbs must be used within a BreadcrumbsProvider'); | ||
} | ||
|
||
return context; | ||
}; |
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
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
b613642
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
refugee-info-italy – ./
refugee-info-italy-signpost.vercel.app
refugee-info-italy.vercel.app
italy.refugee.info
refugee-info-italy-git-main-signpost.vercel.app
www.italy.refugee.info