-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: scrolling issue with banner on landing page (#3429)
- Loading branch information
1 parent
3f3a048
commit d0e08b3
Showing
7 changed files
with
144 additions
and
82 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,5 @@ | ||
--- | ||
"@venusprotocol/landing": minor | ||
--- | ||
|
||
fix scrolling issue with banner on landing page |
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,25 @@ | ||
import { createContext, useContext as useReactContext, useState } from 'react'; | ||
|
||
interface AppStateContextProps { | ||
isMobileMenuOpen: boolean; | ||
setIsMobileMenuOpen: (isOpen: boolean) => void; | ||
} | ||
|
||
const AppStateContext = createContext<AppStateContextProps>({ | ||
isMobileMenuOpen: false, | ||
setIsMobileMenuOpen: () => {}, | ||
}); | ||
|
||
export const useAppStateContext = () => useReactContext(AppStateContext); | ||
|
||
export const AppStateProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => { | ||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); | ||
|
||
return ( | ||
<AppStateContext.Provider value={{ isMobileMenuOpen, setIsMobileMenuOpen }}> | ||
{children} | ||
</AppStateContext.Provider> | ||
); | ||
}; | ||
|
||
export const AppStateConsumer = AppStateContext.Consumer; |