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:
Nathan Hayfield 2022-02-18 18:39:44 +01:00 committed by GitHub
parent f0843d6f44
commit fd8ec0099e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 400 additions and 214 deletions

View 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>
)
}