Skip to content

Commit

Permalink
Setup pages for v2 routes
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMHasperhoven committed Sep 24, 2024
1 parent 93e0e53 commit ed7d79b
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 10 deletions.
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(() => {
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

0 comments on commit ed7d79b

Please sign in to comment.