Skip to content

Commit

Permalink
remove useEffect in app
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jan 30, 2024
1 parent 27a195e commit 6ad825e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/builddao/widget/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const Root = styled.div`
${theme}// can come from config
`;

const [activeRoute, setActiveRoute] = useState(page);
// const [activeRoute, setActiveRoute] = useState(page);

useEffect(() => {
setActiveRoute(page);
}, [page]);
// useEffect(() => {
// setActiveRoute(page);
// }, [page]);

function Router({ active, routes }) {
// this may be converted to a module at devs.near/widget/Router
Expand Down Expand Up @@ -74,9 +74,9 @@ const Content = styled.div`
return (
<Root>
<Container>
<AppLayout page={activeRoute} routes={routes}>
<AppLayout page={page} routes={routes}>
<Content>
<Router active={activeRoute} routes={routes} />
<Router active={page} routes={routes} />
</Content>
</AppLayout>
</Container>
Expand Down

0 comments on commit 6ad825e

Please sign in to comment.