From 7cd6bb8a191e18b23a460a541d81a3498555c31f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Santana=20Gon=C3=A7alves?= Date: Mon, 16 Sep 2024 12:20:32 -0300 Subject: [PATCH] change the root page to user page when user is logged in (#210) --- src/app/page.tsx | 6 ++++++ src/components/LeftSidebar/SidebarButtons.tsx | 6 +++--- src/pages/proposals/[id].tsx | 4 ---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index a77573c3..3424f841 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,12 @@ 'use client' +import { useAccount } from 'wagmi' import { Login } from './login' +import User from './user/page' export default function Home() { + const { isConnected } = useAccount() + if (isConnected) { + return + } return } diff --git a/src/components/LeftSidebar/SidebarButtons.tsx b/src/components/LeftSidebar/SidebarButtons.tsx index 15b0f8d9..fa5a124c 100644 --- a/src/components/LeftSidebar/SidebarButtons.tsx +++ b/src/components/LeftSidebar/SidebarButtons.tsx @@ -11,12 +11,12 @@ const DEFAULT_BUTTON_CLASSNAME = 'mb-[32px] pl-11' const START_ICON_CLASSES = 'left-[-28px] top-[2px]' export const SidebarButtons = ({ onClick, activeButton = 'communities' }: SidebarButtonsProps) => ( -
+ <> -
+ ) diff --git a/src/pages/proposals/[id].tsx b/src/pages/proposals/[id].tsx index 92cb176f..4bab6215 100644 --- a/src/pages/proposals/[id].tsx +++ b/src/pages/proposals/[id].tsx @@ -342,10 +342,6 @@ const BreadcrumbSection: FC<{ title: string }> = ({ title }) => { return ( - - Home - - Proposals