2022-03-13 14:40:38 +08:00
|
|
|
import { Toaster } from 'react-hot-toast'
|
|
|
|
import { QueryClientProvider } from 'react-query'
|
|
|
|
import { ReactQueryDevtools } from 'react-query/devtools'
|
|
|
|
import Player from '@/components/Player'
|
|
|
|
import Sidebar from '@/components/Sidebar'
|
|
|
|
import reactQueryClient from '@/utils/reactQueryClient'
|
|
|
|
import Main from './components/Main'
|
2022-04-04 17:51:07 +08:00
|
|
|
import TitleBar from './components/Titlebar'
|
2022-03-13 14:40:38 +08:00
|
|
|
|
|
|
|
const App = () => {
|
|
|
|
return (
|
|
|
|
<QueryClientProvider client={reactQueryClient}>
|
2022-04-04 17:51:07 +08:00
|
|
|
{window.env?.isWin && <TitleBar />}
|
|
|
|
|
2022-03-17 19:30:43 +08:00
|
|
|
<div id='layout' className='grid select-none grid-cols-[16rem_auto]'>
|
2022-03-13 14:40:38 +08:00
|
|
|
<Sidebar />
|
|
|
|
<Main />
|
|
|
|
<Player />
|
|
|
|
</div>
|
|
|
|
|
2022-03-17 19:30:43 +08:00
|
|
|
<Toaster position='bottom-center' containerStyle={{ bottom: '5rem' }} />
|
2022-03-13 14:40:38 +08:00
|
|
|
|
|
|
|
{/* Devtool */}
|
|
|
|
<ReactQueryDevtools
|
|
|
|
initialIsOpen={false}
|
|
|
|
toggleButtonProps={{
|
|
|
|
style: {
|
|
|
|
position: 'fixed',
|
|
|
|
right: '0',
|
|
|
|
left: 'auto',
|
|
|
|
bottom: '4rem',
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</QueryClientProvider>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default App
|