mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
removed userType from app state
This commit is contained in:
parent
dfb8c3c155
commit
3f5cb76dec
@ -13,7 +13,6 @@ export function AppShell({
|
|||||||
appName,
|
appName,
|
||||||
children,
|
children,
|
||||||
assetsApi,
|
assetsApi,
|
||||||
userType,
|
|
||||||
}: {
|
}: {
|
||||||
appName: string
|
appName: string
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
@ -23,7 +22,7 @@ export function AppShell({
|
|||||||
return (
|
return (
|
||||||
<ContextWrapper>
|
<ContextWrapper>
|
||||||
<div className='tw-flex tw-flex-col tw-h-full'>
|
<div className='tw-flex tw-flex-col tw-h-full'>
|
||||||
<SetAppState assetsApi={assetsApi} userType={userType} />
|
<SetAppState assetsApi={assetsApi} />
|
||||||
<NavBar appName={appName}></NavBar>
|
<NavBar appName={appName}></NavBar>
|
||||||
<div id='app-content' className='tw-flex-grow'>
|
<div id='app-content' className='tw-flex-grow'>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@ -4,13 +4,7 @@ import { useSetAppState } from './hooks/useAppState'
|
|||||||
|
|
||||||
import type { AssetsApi } from '#types/AssetsApi'
|
import type { AssetsApi } from '#types/AssetsApi'
|
||||||
|
|
||||||
export const SetAppState = ({
|
export const SetAppState = ({ assetsApi }: { assetsApi: AssetsApi }) => {
|
||||||
assetsApi,
|
|
||||||
userType,
|
|
||||||
}: {
|
|
||||||
assetsApi: AssetsApi
|
|
||||||
userType: string
|
|
||||||
}) => {
|
|
||||||
const setAppState = useSetAppState()
|
const setAppState = useSetAppState()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -18,9 +12,5 @@ export const SetAppState = ({
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [assetsApi])
|
}, [assetsApi])
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setAppState({ userType })
|
|
||||||
}, [setAppState, userType])
|
|
||||||
|
|
||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user