From 5cc75f048cf3e1bbf5723d3f97008eda0e643e8d Mon Sep 17 00:00:00 2001 From: Dallas <71103219+LeleDallas@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:29:14 +0200 Subject: [PATCH 1/6] fix: missing icon, scroll on change --- src/App.tsx | 6 +++++- src/navigator/Aside.tsx | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 65752ec..358f3a0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { useEffect, useState } from 'react' import Navbar from './navigator/Navbar' import About from './screens/About' import Aside from './navigator/Aside' @@ -12,6 +12,10 @@ function App() { const [active, setActive] = useState("About") + useEffect(() => { + window.scrollTo(0, 0) + }, [active]) + return (