mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-25 00:55:03 +01:00
Clean up
This commit is contained in:
@@ -4,7 +4,6 @@ import { Outlet } from 'react-router-dom';
|
||||
import { useOsInfo } from '../hooks/useOsInfo';
|
||||
import { DialogProvider, Dialogs } from './DialogContext';
|
||||
import { GlobalHooks } from './GlobalHooks';
|
||||
import { RequestEditorProvider } from './RequestEditorContext';
|
||||
import { ToastProvider, Toasts } from './ToastContext';
|
||||
|
||||
export function DefaultLayout() {
|
||||
@@ -12,25 +11,23 @@ export function DefaultLayout() {
|
||||
return (
|
||||
<DialogProvider>
|
||||
<ToastProvider>
|
||||
<RequestEditorProvider>
|
||||
<>
|
||||
{/* Must be inside all the providers, so they have access to them */}
|
||||
<Toasts />
|
||||
<Dialogs />
|
||||
</>
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ duration: 0.1, delay: 0.1 }}
|
||||
className={classNames(
|
||||
'w-full h-full',
|
||||
osInfo?.osType === 'linux' && 'border border-border-subtle',
|
||||
)}
|
||||
>
|
||||
<Outlet />
|
||||
</motion.div>
|
||||
<GlobalHooks />
|
||||
</RequestEditorProvider>
|
||||
<>
|
||||
{/* Must be inside all the providers, so they have access to them */}
|
||||
<Toasts />
|
||||
<Dialogs />
|
||||
</>
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ duration: 0.1, delay: 0.1 }}
|
||||
className={classNames(
|
||||
'w-full h-full',
|
||||
osInfo?.osType === 'linux' && 'border border-border-subtle',
|
||||
)}
|
||||
>
|
||||
<Outlet />
|
||||
</motion.div>
|
||||
<GlobalHooks />
|
||||
</ToastProvider>
|
||||
</DialogProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user