mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-12-11 11:43:39 +08:00
46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import { Toaster } from 'react-hot-toast'
|
|
import { QueryClientProvider } from '@tanstack/react-query'
|
|
import { ReactQueryDevtools } from 'react-query/devtools'
|
|
import Player from '@/web/components/Player'
|
|
import Sidebar from '@/web/components/Sidebar'
|
|
import reactQueryClient from '@/web/utils/reactQueryClient'
|
|
import Main from '@/web/components/Main'
|
|
import TitleBar from '@/web/components/TitleBar'
|
|
import Lyric from '@/web/components/Lyric'
|
|
import IpcRendererReact from '@/web/IpcRendererReact'
|
|
|
|
const App = () => {
|
|
return (
|
|
<QueryClientProvider client={reactQueryClient}>
|
|
{window.env?.isEnableTitlebar && <TitleBar />}
|
|
|
|
<div id='layout' className='grid select-none grid-cols-[16rem_auto]'>
|
|
<Sidebar />
|
|
<Main />
|
|
<Player />
|
|
</div>
|
|
|
|
<Lyric />
|
|
|
|
<Toaster position='bottom-center' containerStyle={{ bottom: '5rem' }} />
|
|
|
|
<IpcRendererReact />
|
|
|
|
{/* Devtool */}
|
|
<ReactQueryDevtools
|
|
initialIsOpen={false}
|
|
toggleButtonProps={{
|
|
style: {
|
|
position: 'fixed',
|
|
right: '0',
|
|
left: 'auto',
|
|
bottom: '4rem',
|
|
},
|
|
}}
|
|
/>
|
|
</QueryClientProvider>
|
|
)
|
|
}
|
|
|
|
export default App
|