Skip to content

Commit

Permalink
make dark is the default theme not system (cuz dark look better right…
Browse files Browse the repository at this point in the history
… now)
  • Loading branch information
No0ne003 committed May 14, 2024
1 parent e684113 commit 517a838
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { useState } from "react";
import menus from "./pages/tree-view/data";
// Layouts
import Header from "@/layouts/header";
// components
import Starfield from "react-starfield";
import Cursor from "./components/Cursor";
// Pages
import Home from "@/pages/Home";
import NotFound from "@/pages/404";
Expand All @@ -27,17 +30,12 @@ import UseFetchHookTest from "./pages/CustomHooks/use-fetch/test";
import UseOnClickOutsideTest from "./pages/CustomHooks/use-outside-click/test";
import { UseWindowResizeTest } from "./pages/CustomHooks/use-window-resize/test";
import ScrollToSection from "./pages/ScrollToSection";
import Cursor from "./components/Cursor";
import Starfield from "react-starfield";
import useWhatTheme from "./lib/utils";

function App() {
const [cursorVariant, setCursorVariant] = useState("default");
const { theme } = useWhatTheme();
console.log(theme);

return (
<ThemeProvider defaultTheme="system" storageKey="ui-theme">
<ThemeProvider defaultTheme="dark" storageKey="ui-theme">
<div className="hidden dark:block">
<Starfield
starCount={500}
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export function cn(...inputs) {
return twMerge(clsx(inputs));
}

// know what theme is set and set theme
export default function useWhatTheme() {
const { theme, setTheme } = useTheme();

Expand Down

0 comments on commit 517a838

Please sign in to comment.