25 lines
695 B
TypeScript
Raw Normal View History

2022-05-12 02:45:43 +08:00
import IpcRendererReact from '@/web/IpcRendererReact'
2022-10-28 20:29:04 +08:00
import Layout from '@/web/components/Layout'
import Devtool from '@/web/components/Devtool'
import ErrorBoundary from '@/web/components/ErrorBoundary'
import useIsMobile from '@/web/hooks/useIsMobile'
import LayoutMobile from '@/web/components/LayoutMobile'
import ScrollRestoration from '@/web/components/ScrollRestoration'
import Toaster from './components/Toaster'
2022-03-13 14:40:38 +08:00
const App = () => {
2022-10-28 20:29:04 +08:00
const isMobile = useIsMobile()
2022-03-13 14:40:38 +08:00
2022-10-28 20:29:04 +08:00
return (
<ErrorBoundary>
{isMobile ? <LayoutMobile /> : <Layout />}
<Toaster />
<ScrollRestoration />
<IpcRendererReact />
2022-10-28 20:29:04 +08:00
<Devtool />
</ErrorBoundary>
2022-03-13 14:40:38 +08:00
)
}
export default App