import { Money } from "@styled-icons/boxicons-regular"; import { Home as HomeIcon, PlusCircle, Compass, Megaphone, Group, Cog, RightArrowCircle, } from "@styled-icons/boxicons-solid"; import { observer } from "mobx-react-lite"; import { Link } from "react-router-dom"; import styled, { css } from "styled-components"; import styles from "./Home.module.scss"; import "./snow.scss"; import { Text } from "preact-i18n"; import { useContext, useMemo } from "preact/hooks"; import { useApplicationState } from "../../mobx/State"; import { AppContext } from "../../context/revoltjs/RevoltClient"; import wideSVG from "../../../public/assets/wide.svg"; import Tooltip from "../../components/common/Tooltip"; import { PageHeader } from "../../components/ui/Header"; import CategoryButton from "../../components/ui/fluent/CategoryButton"; const Overlay = styled.div` display: grid; height: 100%; > * { grid-area: 1 / 1; } .content { z-index: 1; } `; export default observer(() => { const client = useContext(AppContext); const state = useApplicationState(); const toggleSeasonalTheme = () => state.settings.set( "appearance:seasonal", !state.settings.get("appearance:seasonal"), ); const seasonalTheme = state.settings.get("appearance:seasonal") ?? true; const isDecember = new Date().getMonth() === 11; const snowflakes = useMemo(() => { const flakes = []; // Disable outside of December if (!isDecember) return []; for (let i = 0; i < 15; i++) { flakes.push("❄️"); flakes.push("❄"); } for (let i = 0; i < 2; i++) { flakes.push("🎄"); flakes.push("☃️"); flakes.push("⛄"); } return flakes; }, []); return (