From 0530372b03be5dcfbfe97a0b41ddb36d8b587c1b Mon Sep 17 00:00:00 2001 From: Your name Date: Thu, 12 Jan 2023 13:31:26 +0100 Subject: [PATCH] fix: cleaned up app.tsx --- src/App.tsx | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c205863..3aeb570 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,47 +1,13 @@ -import React, { useEffect } from "react"; -import useStore from "@store"; -import { Box } from "@components/base"; -import { Main } from "@components/inc"; +import React from "react"; +import { MainLayout, Scaffold } from "@components/inc"; function App() { - const setTheme = useStore((state) => state.setTheme); - useEffect(() => { - setTheme(); - }, []); return ( <> -
- + + ); } -const ImageCache = () => { - const [photos, setPhotos] = useStore((state) => [ - state.photos, - state.setPhotos, - ]); - useEffect(() => { - const today = new Date().toDateString(); - const todayImage = photos.filter( - (photo) => new Date(photo.for).toDateString() === today - )[0]; - if (photos.length === 0 || !todayImage) { - setPhotos("mountains", false); - } - }, []); - return ( - - {photos?.map((photo, index) => { - return ( - image - ); - })} - - ); -}; export default App;