import { Money } from "@styled-icons/boxicons-regular"; import { Home as HomeIcon, PlusCircle, Compass, Megaphone, Group, Cog, RightArrowCircle, } from "@styled-icons/boxicons-solid"; 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, useState } from "preact/hooks"; import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice"; import { dispatch, getState } from "../../redux"; import { AppContext } from "../../context/revoltjs/RevoltClient"; import wideSVG from "../../../public/assets/wide.svg"; import Emoji from "../../components/common/Emoji"; import Tooltip from "../../components/common/Tooltip"; import Header from "../../components/ui/Header"; import CategoryButton from "../../components/ui/fluent/CategoryButton"; const CHANNELS_SIDEBAR_KEY = "sidebar_channels"; const IconConainer = styled.div` cursor: pointer; color: var(--secondary-foreground); ${!isTouchscreenDevice && css` &:hover { color: var(--foreground); } `} `; const Overlay = styled.div` display: grid; height: 100%; > * { grid-area: 1 / 1; } .content { z-index: 1; } `; export default function Home() { const client = useContext(AppContext); const [showChannels, setChannels] = useState( getState().sectionToggle[CHANNELS_SIDEBAR_KEY] ?? true, ); const toggleChannelSidebar = () => { if (isTouchscreenDevice) { return; } setChannels(!showChannels); if (showChannels) { dispatch({ type: "SECTION_TOGGLE_SET", id: CHANNELS_SIDEBAR_KEY, state: false, }); } else { dispatch({ type: "SECTION_TOGGLE_UNSET", id: CHANNELS_SIDEBAR_KEY, }); } }; const snowflakes = useMemo(() => { const flakes = []; // Disable outside of December if (new Date().getMonth() !== 11) 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 (
{snowflakes.map((emoji, index) => (
{emoji}
))}


} description={ "Invite all of your friends, some cool bots, and throw a big party." }> Create a group } description={ "Find a community based on your hobbies or interests." }> Join a community {client.servers.get( "01F7ZSBSFHQ8TA81725KQCSDDP", ) ? ( } description={ "You can report issues and discuss improvements with us directly here." }> ) : ( } description={ "You can report issues and discuss improvements with us directly here." }> )} } description={ "Let us know how we can improve our app by giving us feedback." }> }> }> }>
Turn off homescreen effects
{" "}
); }