mirror of
https://github.com/stackrender/stackrender.git
synced 2026-09-10 11:15:42 +00:00
35 lines
701 B
TypeScript
35 lines
701 B
TypeScript
|
|
import React, { Suspense } from "react";
|
|
import { Loading } from "@/components/layout/loading-modal";
|
|
import { useIsMobile } from "@/hooks/use-mobile";
|
|
|
|
|
|
|
|
const DatabaseDesktopLayout = React.lazy(
|
|
() => import('./desktop-layout')
|
|
);
|
|
|
|
const DatabaseMobileLayout = React.lazy(
|
|
() => import('./mobile-layout')
|
|
);
|
|
export const DatabaseLayout: React.FC = () => {
|
|
|
|
const isMobile = useIsMobile() ;
|
|
|
|
return (
|
|
|
|
<Suspense
|
|
fallback={
|
|
<Loading/>
|
|
}
|
|
>
|
|
{
|
|
isMobile ? <DatabaseMobileLayout/> : <DatabaseDesktopLayout/>
|
|
}
|
|
|
|
</Suspense>
|
|
);
|
|
};
|
|
|
|
export default DatabaseLayout;
|