import { useState } from "react" import { useAppContext } from "~/providers/AppProvider" import { AsyncButton } from "../components/AsyncButton" import AllTimeStats from "~/components/AllTimeStats" import ActivityGrid from "~/components/ActivityGrid" import LastPlays from "~/components/LastPlays" import TopAlbums from "~/components/TopAlbums" import TopArtists from "~/components/TopArtists" import TopTracks from "~/components/TopTracks" import { useTheme } from "~/hooks/useTheme" import { themes, type Theme } from "~/styles/themes.css" export default function ThemeHelper() { const initialTheme = { name: "custom", bg: "#1e1816", bgSecondary: "#2f2623", bgTertiary: "#453733", fg: "#f8f3ec", fgSecondary: "#d6ccc2", fgTertiary: "#b4a89c", primary: "#f5a97f", primaryDim: "#d88b65", accent: "#f9db6d", accentDim: "#d9bc55", error: "#e26c6a", warning: "#f5b851", success: "#8fc48f", info: "#87b8dd", } const [custom, setCustom] = useState(JSON.stringify(initialTheme, null, " ")) const { setCustomTheme } = useTheme() const handleCustomTheme = () => { console.log(custom) try { const theme = JSON.parse(custom) as Theme if (theme.name !== "custom") { throw new Error("theme name must be 'custom'") } console.log(theme) setCustomTheme(theme) } catch(err) { console.log(err) } } const homeItems = 3 return (
You"re logged in as Example User
successfully displayed example text
this is an example of error text
here is an informational example
heed this warning, traveller