Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const currentPage: JSX.Element = useComputed(() => {
switch (store.viewStore.currentPage) {
case AppPage.Home:
return
case AppPage.ComponentsDemos:
return
case AppPage.ServerApiDemo:
return
case AppPage.HooksDemo:
return
default:
throw new Error(`Unknown page ${store.viewStore.currentPage}`)
}
})
const menuItems: AppkitMenuItem[] = useComputed(() => {
return [
{
name: 'Home',
onClick: () => {
store.viewStore.setPage(AppPage.Home)
}
},
{
name: 'Components Demo',
onClick: () => {
store.viewStore.setPage(AppPage.ComponentsDemos)
}
},
{
name: 'Server API Demo',
onClick: () => {
export const App = observer(() => {
const store = React.useContext(StoreContext)
const currentPage: JSX.Element = useComputed(() => {
switch (store.viewStore.currentPage) {
case AppPage.Home:
return
case AppPage.ComponentsDemos:
return
case AppPage.ServerApiDemo:
return
case AppPage.HooksDemo:
return
default:
throw new Error(`Unknown page ${store.viewStore.currentPage}`)
}
})
const menuItems: AppkitMenuItem[] = useComputed(() => {
return [