Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(shell): create new proposal page #847

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
24 changes: 14 additions & 10 deletions apps/shell/src/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';
import { useEffect } from 'react';
import * as Sentry from '@sentry/nextjs';
import { Button, Container, Heading } from '@haqq/shell-ui-kit';

export default function ErrorPage({
error,
Expand All @@ -15,15 +16,18 @@ export default function ErrorPage({
}, [error]);

return (
<div>
<h2>Something went wrong!</h2>
<button
onClick={() => {
reset();
}}
>
Try again
</button>
</div>
<Container>
<div className="flex flex-col items-center justify-center gap-8 py-32">
<Heading level={2}>Something went wrong!</Heading>

<Button
onClick={() => {
reset();
}}
>
Try again
</Button>
</div>
</Container>
);
}
27 changes: 16 additions & 11 deletions apps/shell/src/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { useEffect } from 'react';
import * as Sentry from '@sentry/nextjs';
import NextError from 'next/error';
import { Button, Heading } from '@haqq/shell-ui-kit';

export default function GlobalError({
error,
Expand All @@ -17,17 +18,21 @@ export default function GlobalError({
return (
<html>
<body>
<h2>Something went wrong!</h2>
{/* This is the default Next.js error component but it doesn't allow omitting the statusCode property yet. */}
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
<NextError statusCode={undefined as any} />
<button
onClick={() => {
reset();
}}
>
Try again
</button>
<div className="flex flex-col items-center justify-center gap-6 py-24">
<Heading level={2}>Something went wrong!</Heading>

<Button
onClick={() => {
reset();
}}
>
Try again
</Button>

{/* This is the default Next.js error component but it doesn't allow omitting the statusCode property yet. */}
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
<NextError statusCode={undefined as any} style={{ height: 'auto' }} />
</div>
</body>
</html>
);
Expand Down
6 changes: 0 additions & 6 deletions apps/shell/src/app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,4 @@ body {

body {
@apply bg-haqq-black font-guise text-white will-change-scroll;

/* background-image: url(/sunrise.jpg);
background-position: top center;
background-repeat: no-repeat;
background-size: contain;
background-attachment: fixed; */
}
37 changes: 37 additions & 0 deletions apps/shell/src/app/governance/proposal/new/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import {
HydrationBoundary,
QueryClient,
dehydrate,
} from '@tanstack/react-query';
import { Container } from '@haqq/shell-ui-kit';
import { CreateSoftwareUpgradeProposalFormKeplr } from '../../../../components/submit-proposal-su-form-keplr';
import { CreateTextProposalFormKeplr } from '../../../../components/submit-proposal-text-form-keplr';

export default async function CreateProposal() {
const queryClient = new QueryClient();

const dehydratedState = dehydrate(queryClient);

return (
<HydrationBoundary state={dehydratedState}>
<div>
<div className="py-[32px] lg:py-[68px]">
<Container>
<div className="font-clash text-[28px] uppercase leading-none sm:text-[48px] lg:text-[70px]">
Submit proposal
</div>
</Container>
</div>

<div>
<Container>
<div className="flex flex-col gap-12 md:flex-row">
<CreateTextProposalFormKeplr />
<CreateSoftwareUpgradeProposalFormKeplr />
</div>
</Container>
</div>
</div>
</HydrationBoundary>
);
}
Loading
Loading