only access on desktop

This commit is contained in:
Christopher Arraya 2024-01-13 21:04:03 -05:00
parent c55ab3d49e
commit e80c356154

View File

@ -22,22 +22,51 @@ export default function RootLayout({
}) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<head>
<style>
{`
@media (max-width: 768px) {
.desktop-content {
display: none;
}
.mobile-message {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
font-size: 20px;
}
}
@media (min-width: 769px) {
.mobile-message {
display: none;
}
}
`}
</style>
</head>
<body
className={cn(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable
)}
>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
<Toaster />
</ThemeProvider>
<div className="desktop-content">
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
<Toaster />
</ThemeProvider>
</div>
<div className="mobile-message font-semibold">
Skalara works best on a desktop browser. Please visit us again.
</div>
</body>
</html>
);