Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions govtool/frontend/src/components/organisms/DashboardTopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
} from "@hooks";
import {
DashboardDrawerMobile,
useMaintenanceEndingBannerContext,
} from "@organisms";
import { useCardano } from "@context";

Expand All @@ -31,8 +30,6 @@ export const DashboardTopNav = ({
const { isEnableLoading } = useCardano();
const { voter } = useGetVoterInfo();
const { dRepVotingPower } = useGetDRepVotingPowerQuery(voter);
const { height: maintenanceEndingBannerHeight } =
useMaintenanceEndingBannerContext();

const openDrawer = () => {
setIsDrawerOpen(true);
Expand All @@ -58,7 +55,7 @@ export const DashboardTopNav = ({
alignItems: "center",
backdropFilter: "blur(10px)",
backgroundColor:
windowScroll > POSITION_TO_BLUR + maintenanceEndingBannerHeight
windowScroll > POSITION_TO_BLUR
? "rgba(256, 256, 256, 0.7)"
: isMobile
? "#FBFBFF59"
Expand All @@ -70,7 +67,7 @@ export const DashboardTopNav = ({
minHeight: isMobile ? 36 : 48,
px: isMobile ? 2 : 5,
py: 3,
top: maintenanceEndingBannerHeight || 0,
top: 0,
width: "fill-available",
zIndex: 100,
}}
Expand Down
7 changes: 2 additions & 5 deletions govtool/frontend/src/components/organisms/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ import { useFeatureFlag } from "@context";
import { useGetVoterInfo } from "@hooks";
import { WalletInfoCard, DRepInfoCard } from "@molecules";
import { openInNewTab } from "@utils";
import { useMaintenanceEndingBannerContext } from "./MaintenanceEndingBanner";

export const Drawer = () => {
const {
isProposalDiscussionForumEnabled,
isGovernanceOutcomesPillarEnabled,
} = useFeatureFlag();
const { voter } = useGetVoterInfo();
const { height: maintenanceEndingBannerHeight } =
useMaintenanceEndingBannerContext();

return (
<Box
Expand All @@ -27,9 +24,9 @@ export const Drawer = () => {
height: "100vh",
position: "sticky",
width: `${DRAWER_WIDTH}px`,
top: maintenanceEndingBannerHeight || 0,
top: 0,
overflowY: "auto",
maxHeight: `calc(100vh - ${maintenanceEndingBannerHeight || 0}px)`,
maxHeight: `calc(100vh - ${0}px)`,
}}
>
<NavLink
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions govtool/frontend/src/components/organisms/TopBanners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Box, Link, Typography } from "@mui/material";
import { Trans, useTranslation } from "react-i18next";
import { useAppContext } from "@/context";
import { LINKS } from "@/consts/links";
import { MaintenanceEndingBanner } from "./MaintenanceEndingBanner";

export const TopBanners = ({ children }: PropsWithChildren) => {
const { isMainnet, networkName, isInBootstrapPhase, isAppInitializing } =
Expand Down Expand Up @@ -48,9 +47,6 @@ export const TopBanners = ({ children }: PropsWithChildren) => {
)}
</Box>

{/* GOVTOOL MAINTENANCE ENDING SOON BANNER */}
<MaintenanceEndingBanner />

{/* BOOTSTRAPPING BANNER */}
<Box>
{isInBootstrapPhase && (
Expand Down
5 changes: 0 additions & 5 deletions govtool/frontend/src/components/organisms/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useCardano, useFeatureFlag, useModal } from "@context";
import { useScreenDimension, useTranslation } from "@hooks";
import { openInNewTab } from "@utils";
import { DrawerMobile } from "./DrawerMobile";
import { useMaintenanceEndingBannerContext } from "./MaintenanceEndingBanner";

const POSITION_TO_BLUR = 80;

Expand All @@ -25,9 +24,6 @@ export const TopNav = ({ isConnectButton = true }) => {
const navigate = useNavigate();
const { t } = useTranslation();

const { height: maintenanceEndingBannerHeight } =
useMaintenanceEndingBannerContext();

useEffect(() => {
const onScroll = () => {
if (!containerRef.current?.nextElementSibling) return;
Expand Down Expand Up @@ -141,7 +137,6 @@ export const TopNav = ({ isConnectButton = true }) => {
<Box
sx={{
position: "sticky",
top: maintenanceEndingBannerHeight,
zIndex: 100,
width: "100%",
}}
Expand Down
1 change: 0 additions & 1 deletion govtool/frontend/src/components/organisms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ export * from "./VoteContext";
export * from "./VoteContext/VoteContextChoice";
export * from "./VoteContext/VoteContextGovTool";
export * from "./WrongRouteInfo";
export * from "./MaintenanceEndingBanner";
6 changes: 1 addition & 5 deletions govtool/frontend/src/context/contextProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { GovernanceActionProvider } from "./governanceAction";
import { AdaHandleProvider } from "./adaHandle";
import { ProposalDiscussionProvider } from "./proposalDiscussion";

import { MaintenanceEndingBannerProvider } from "@/components/organisms/MaintenanceEndingBanner/MaintenanceEndingBannerContext";

interface Props {
children: React.ReactNode;
}
Expand All @@ -26,9 +24,7 @@ const ContextProviders = ({ children }: Props) => (
<DataActionsBarProvider>
<PaginationProvider>
<CardanoProvider>
<MaintenanceEndingBannerProvider>
{children}
</MaintenanceEndingBannerProvider>
{children}
</CardanoProvider>
</PaginationProvider>
</DataActionsBarProvider>
Expand Down
7 changes: 1 addition & 6 deletions govtool/frontend/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -794,12 +794,7 @@
"system": {
"description": "The Cardano GovTool is a tool that allows you to participate in the governance of the Cardano network. You can propose, vote on, and delegate your voting power to other users.",
"title": "This tool is connected to {{networkName}}",
"bootstrappingWarning": "Govtool is in the Bootstrapping phase. Some features are not available. <docs>Learn more</docs>",
"maintenanceEnding": {
"title": "\uD83D\uDCA1 Next Step: Treasury Withdrawal based on your feedback has been submitted",
"description1": "<0>The Info Action</0> has passed — thank you for your support!",
"description2": "We have now submitted a <0>Treasury Withdrawal</0> that reflects the feedback gathered during the voting phase to ensure continued development and maintenance of GovTool as a community-owned governance interface on Cardano."
}
"bootstrappingWarning": "Govtool is in the Bootstrapping phase. Some features are not available. <docs>Learn more</docs>"
},
"tooltips": {
"delegateTodRep": {
Expand Down
Loading