-
Notifications
You must be signed in to change notification settings - Fork 1
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
f3b4deb
commit c3a2549
Showing
4 changed files
with
84 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { createContext, useContext, useState, Dispatch, SetStateAction } from 'react'; | ||
import { Dispatch, SetStateAction, createContext, useContext } from "react" | ||
|
||
type LayoutTypeContextProps = { | ||
layoutType: string, | ||
layoutType: string | ||
setLayoutType: Dispatch<SetStateAction<string>> | null | ||
} | ||
|
||
export const LayoutTypeContext = createContext<LayoutTypeContextProps>({ layoutType: 'Regular', setLayoutType: null }); | ||
export const LayoutTypeContext = createContext<LayoutTypeContextProps>({ | ||
layoutType: "Regular", | ||
setLayoutType: null, | ||
}) | ||
|
||
export function useLayoutType() : LayoutTypeContextProps { | ||
return useContext(LayoutTypeContext); | ||
} | ||
export function useLayoutType(): LayoutTypeContextProps { | ||
return useContext(LayoutTypeContext) | ||
} |
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