Skip to content

Commit

Permalink
Merge pull request #233 from kloudlite/refactoring/revert-dark-mode
Browse files Browse the repository at this point in the history
dark mode removed
  • Loading branch information
tulsiojha authored Jun 24, 2024
2 parents 1b74df2 + 2155fdb commit 3e571ef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
30 changes: 15 additions & 15 deletions lib/app-setup/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,21 @@ const Root = ({
}}
/>

<script
// @ts-ignore
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: `
try {
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.querySelector('html').setAttribute('data-theme', 'dark')
} else {
document.querySelector('html').setAttribute('data-theme', 'light')
}
} catch (_) {}
`,
}}
/>
{/* <script */}
{/* // @ts-ignore */}
{/* // eslint-disable-next-line react/no-danger */}
{/* dangerouslySetInnerHTML={{ */}
{/* __html: ` */}
{/* try { */}
{/* if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { */}
{/* document.querySelector('html').setAttribute('data-theme', 'dark') */}
{/* } else { */}
{/* document.querySelector('html').setAttribute('data-theme', 'light') */}
{/* } */}
{/* } catch (_) {} */}
{/* `, */}
{/* }} */}
{/* /> */}
</head>
<body className="antialiased">
<div
Expand Down
2 changes: 1 addition & 1 deletion src/apps/auth/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const Footer = () => {
<div className="hidden md:block lg:hidden">
<SocialMenu />
</div>
<ThemeSwitcher />
{/* <ThemeSwitcher /> */}
</div>
</div>
<div className="flex flex-col-reverse gap-4xl md:gap-0 md:flex-row md:items-center lg:justify-between">
Expand Down
13 changes: 1 addition & 12 deletions src/apps/auth/routes/_main+/cli-logged-in.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import { Link } from '@remix-run/react';
import Container from '~/auth/components/container';
import { Button } from '~/components/atoms/button';
import { getCookie } from '~/root/lib/app-setup/cookies';
import withContext from '~/root/lib/app-setup/with-contxt';
import { IExtRemixCtx } from '~/root/lib/types/common';

const cliLoggedIn = () => {
return (
<Container
headerExtra={
<Button
variant="outline"
content="Sign in"
linkComponent={Link}
to="/login"
/>
}
>
<Container>
<div className="flex flex-col gap-6xl md:w-[500px] px-3xl py-5xl md:px-9xl">
<div className="flex flex-col gap-lg items-center text-center">
<div className="text-text-strong headingXl text-center">
Expand Down

0 comments on commit 3e571ef

Please sign in to comment.