mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-13 23:08:17 +02:00
Style update for User Info Endpoint (#3055)
* style changes from mui 5 * fix spacing issue on small screen * remove unneeded import * add default exports * make linter happy * more style changes * use startCase from lodash Co-authored-by: Caleb Doxsey <cdoxsey@pomerium.com>
This commit is contained in:
parent
f0843d6f44
commit
fd8ec0099e
16 changed files with 400 additions and 214 deletions
31
ui/src/context/Subpage.tsx
Normal file
31
ui/src/context/Subpage.tsx
Normal file
|
@ -0,0 +1,31 @@
|
|||
import React, {createContext, FC, useState} from 'react'
|
||||
|
||||
export interface SubpageContextValue {
|
||||
subpage: string;
|
||||
setSubpage: (subpage: string) => void;
|
||||
}
|
||||
|
||||
export const SubpageContext = createContext<SubpageContextValue>({
|
||||
subpage: "User",
|
||||
setSubpage: (_: string) => {},
|
||||
});
|
||||
|
||||
export const SubpageContextProvider:FC = ({children}) => {
|
||||
|
||||
const setSubpage = (subpage: string) => {
|
||||
setState({...state, subpage})
|
||||
}
|
||||
|
||||
const initState = {
|
||||
subpage: "User",
|
||||
setSubpage
|
||||
}
|
||||
|
||||
const [state, setState] = useState(initState)
|
||||
|
||||
return (
|
||||
<SubpageContext.Provider value={state}>
|
||||
{children}
|
||||
</SubpageContext.Provider>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue