From 3e578234634a1d7e7e5f6e8d2dc4a303c9a58c97 Mon Sep 17 00:00:00 2001 From: yu-zhen Date: Sat, 4 Jan 2025 01:59:03 +0800 Subject: [PATCH] chore: adjust ui bugs --- packages/interface/src/components/BallotOverview.tsx | 10 ++++++++-- packages/interface/src/components/Footer.tsx | 10 +++++----- packages/interface/src/components/Header.tsx | 7 +++++-- .../features/ballot/components/BallotConfirmation.tsx | 2 +- .../interface/src/features/home/components/FaqItem.tsx | 2 +- .../src/features/projects/components/ProjectItem.tsx | 2 +- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packages/interface/src/components/BallotOverview.tsx b/packages/interface/src/components/BallotOverview.tsx index 0dbaf952..1bd50621 100644 --- a/packages/interface/src/components/BallotOverview.tsx +++ b/packages/interface/src/components/BallotOverview.tsx @@ -25,7 +25,13 @@ export const BallotOverview = ({ title = undefined, pollId }: IBallotOverviewPro const { asPath } = useRouter(); - const showButton = useMemo(() => !asPath.includes("ballot"), [asPath]); + const showButton = useMemo( + () => + !asPath.includes("ballot") && + (roundState === ERoundState.VOTING || + ((roundState === ERoundState.TALLYING || roundState === ERoundState.RESULTS) && ballot.published)), + [asPath], + ); return ( -
+
{title} diff --git a/packages/interface/src/components/Footer.tsx b/packages/interface/src/components/Footer.tsx index 340475c5..19b9e116 100644 --- a/packages/interface/src/components/Footer.tsx +++ b/packages/interface/src/components/Footer.tsx @@ -7,8 +7,8 @@ import { config } from "~/config"; import { Logo } from "./ui/Logo"; export const Footer = (): JSX.Element => ( -