import React, { useEffect } from 'react'; import { Route, Routes } from 'react-router-dom'; import { Helmet } from 'react-helmet-async'; import useBoardStore from './useBoardStore'; import Home from './components/Home'; import Board from './components/Board'; import Thread from './components/Thread'; import Catalog from './components/Catalog'; import NotFound from './components/NotFound'; import styled, { createGlobalStyle } from 'styled-components'; import 'react-tooltip/dist/react-tooltip.css'; import 'react-toastify/dist/ReactToastify.css'; import preloadImages from './utils/preloadImages'; import { ToastContainer } from 'react-toastify'; const GlobalStyle = createGlobalStyle` *:focus { outline: none; } body { margin: 0; padding: 0; background: ${props => props.background}; color: ${props => props.color}; font-family: ${props => props.fontFamily}; } .tooltip { border-radius: 0; max-width: 40%; font-size: 11px; padding: 3px; opacity: 100%; } `; const StyledContainer = styled(ToastContainer)` .Toastify__toast { border-radius: 0px; font-size: 11pt; animation-duration: 0s; border: 1px solid #fee9cd; color: #c5c8c6; } `; export default function App() { const { bodyStyle, setBodyStyle } = useBoardStore(state => state); const imageUrls = Array.from({ length: 14 }, (_, index) => `/assets/banners/banner-${index + 1}.jpg`); useEffect(() => { preloadImages([...imageUrls]); }, []); return (
} /> }> } /> } /> }> } /> } /> }> } /> } /> } />
)}