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

Setup pages for v2 routes #68

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions src/app/v2/explore/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client';

import { Text } from '@penumbra-zone/ui/Text';

const ExplorePage = () => {
return (
<section>
<Text h2>Hi!</Text>
</section>
);
};

export default ExplorePage;
13 changes: 13 additions & 0 deletions src/app/v2/inspect/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client';

import { Text } from '@penumbra-zone/ui/Text';

const InspectPage = () => {
return (
<section>
<Text h2>Hi!</Text>
</section>
);
};

export default InspectPage;
22 changes: 13 additions & 9 deletions src/app/v2/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
'use client';

import { Text } from '@penumbra-zone/ui/Text';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { PagePath } from '@/utils/routes/pages.ts';

const HomePage = () => {
return (
<section>
<Text h2>Hi!</Text>
</section>
)
}
const RedirectPage = () => {
const router = useRouter();

export default HomePage;
useEffect(() => {
JasonMHasperhoven marked this conversation as resolved.
Show resolved Hide resolved
router.push(PagePath.Trade);
}, [router]);

return null;
};

export default RedirectPage;
13 changes: 13 additions & 0 deletions src/app/v2/portfolio/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client';

import { Text } from '@penumbra-zone/ui/Text';

const PortfolioPage = () => {
return (
<section>
<Text h2>Hi!</Text>
</section>
);
};

export default PortfolioPage;
13 changes: 13 additions & 0 deletions src/app/v2/trade/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client';

import { Text } from '@penumbra-zone/ui/Text';

const TradePage = () => {
return (
<section>
<Text h2>Hi!</Text>
</section>
);
};

export default TradePage;
3 changes: 2 additions & 1 deletion src/utils/routes/pages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export enum PagePath {
Explore = '/v2',
Home = '/v2',
Explore = '/v2/explore',
Trade = '/v2/trade',
Inspect = '/v2/inspect',
Portfolio = '/v2/portfolio',
Expand Down