-
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
e39071b
commit 74aa9ab
Showing
15 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,23 @@ | ||
import React, { createContext, useContext } from "react"; | ||
|
||
export type NavHoverContextType = { | ||
currentUrl: string; | ||
setCurrentUrl: React.Dispatch<React.SetStateAction<string>>; | ||
}; | ||
|
||
const NavHoverContext = createContext<NavHoverContextType>( | ||
null as unknown as NavHoverContextType | ||
); | ||
|
||
export const useNavHoverContext = () => useContext(NavHoverContext); | ||
|
||
export const NavHoverProvider = ( | ||
{ | ||
children | ||
}: { | ||
children: React.ReactNode | ||
} | ||
) => { | ||
const [currentUrl, setCurrentUrl] = React.useState(''); | ||
return <NavHoverContext.Provider value={{ currentUrl, setCurrentUrl }}>{children}</NavHoverContext.Provider> | ||
}; |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
export interface NavGroupsProps { | ||
title: string; | ||
items: any[]; | ||
videoUrl: string; | ||
}; |