diff --git a/server.mjs b/server.mjs
index 53fc609..fe95a44 100644
--- a/server.mjs
+++ b/server.mjs
@@ -6,7 +6,7 @@ const [app, listen] = new ChemicalServer({
uv: true,
rammerhead: false,
});
-const port = process.env.PORT || 3000;
+const port = process.env.PORT || 3001;
const dev = process.env.NODE_ENV !== "production";
const nextApp = next({ dev });
const handle = nextApp.getRequestHandler();
diff --git a/src/app/globals.css b/src/app/globals.css
index 6b6e125..e9dca30 100644
--- a/src/app/globals.css
+++ b/src/app/globals.css
@@ -23,7 +23,6 @@
--destructive: 6 96% 59%;
--destructive-foreground: 0 0% 100%;
--ring: 215.09 100% 98.03%;
-
--radius: 0.4rem;
}
diff --git a/src/app/settings/credits/page.tsx b/src/app/settings/credits/page.tsx
index 07cb23b..7e5adc2 100644
--- a/src/app/settings/credits/page.tsx
+++ b/src/app/settings/credits/page.tsx
@@ -16,6 +16,7 @@ export default function Credits() {
Scaratek
fwxe
Nebelung
+ anshnk
diff --git a/src/components/ThemeSwitch.tsx b/src/components/ThemeSwitch.tsx
index 3114881..bfc22d9 100644
--- a/src/components/ThemeSwitch.tsx
+++ b/src/components/ThemeSwitch.tsx
@@ -20,7 +20,7 @@ export function ModeToggle() {
diff --git a/src/components/theme-provider.tsx b/src/components/theme-provider.tsx
index 23452bf..cca71f1 100644
--- a/src/components/theme-provider.tsx
+++ b/src/components/theme-provider.tsx
@@ -1,17 +1,17 @@
-import { createContext, useContext, useEffect, useState } from "react";
+import { createContext, useContext, useEffect, useState } from 'react';
type Theme =
- | "radius"
- | "cyberpunk"
- | "bluelight"
- | "midnight"
- | "system";
+ | 'radius'
+ | 'cyberpunk'
+ | 'bluelight'
+ | 'midnight'
+ | 'system';
const themes: Theme[] = [
- "radius",
- "cyberpunk",
- "bluelight",
- "midnight",
- "system",
+ 'radius',
+ 'cyberpunk',
+ 'bluelight',
+ 'midnight',
+ 'system',
];
type ThemeProviderProps = {
children: React.ReactNode;
@@ -26,7 +26,7 @@ type ThemeProviderState = {
const initialState: ThemeProviderState = {
themes: themes,
- theme: "system",
+ theme: 'system',
setTheme: () => null,
};
@@ -34,8 +34,8 @@ const ThemeProviderContext = createContext(initialState);
export function ThemeProvider({
children,
- defaultTheme = "system",
- storageKey = "theme",
+ defaultTheme = 'system',
+ storageKey = 'theme',
...props
}: ThemeProviderProps) {
const [theme, setTheme] = useState(
@@ -45,13 +45,13 @@ export function ThemeProvider({
useEffect(() => {
const root = window.document.documentElement;
- themes.forEach((theme) => root.classList.remove(theme));
+ root.classList.remove(...themes);
- if (theme === "system") {
- const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
+ if (theme === 'system') {
+ const systemTheme = window.matchMedia('(prefers-color-scheme: dark)')
.matches
- ? "default"
- : "bluelight";
+ ? 'midnight'
+ : 'bluelight';
root.classList.add(systemTheme);
return;
@@ -80,7 +80,7 @@ export const useTheme = () => {
const context = useContext(ThemeProviderContext);
if (context === undefined)
- throw new Error("useTheme must be used within a ThemeProvider");
+ throw new Error('useTheme must be used within a ThemeProvider');
return context;
-};
\ No newline at end of file
+};