-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/#110-explore-page-header
- Loading branch information
Showing
17 changed files
with
395 additions
and
200 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { PortfolioPage } from '@/pages/portfolio'; | ||
import { headers } from 'next/headers'; | ||
import { userAgent } from 'next/server'; | ||
|
||
export default function Portfolio() { | ||
const headersList = headers(); | ||
const { device } = userAgent({ headers: headersList }); | ||
return <PortfolioPage isMobile={device.type === 'mobile'} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,57 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
import { XCircle } from 'lucide-react'; | ||
import { Button } from '@penumbra-zone/ui/Button'; | ||
import { Text } from '@penumbra-zone/ui/Text'; | ||
import { Density } from '@penumbra-zone/ui/Density'; | ||
|
||
export const PortfolioPage = () => { | ||
interface PortfolioPageProps { | ||
isMobile: boolean; | ||
} | ||
|
||
export function PortfolioPage({ isMobile }: PortfolioPageProps): React.ReactNode { | ||
return isMobile ? <MobilePortfolioPage /> : <DesktopPortfolioPage />; | ||
} | ||
|
||
function MobilePortfolioPage() { | ||
return ( | ||
<section> | ||
<Text h2>Hi!</Text> | ||
<section className='absolute inset-0 h-screen flex flex-col items-center justify-between p-4 gap-3 border-t border-neutral-800'> | ||
<div className='flex flex-col justify-center items-center p-0 gap-4 w-full flex-grow'> | ||
<div className='relative'> | ||
<XCircle className='text-neutral-light w-8 h-8' /> | ||
</div> | ||
|
||
<Text color={'text.secondary'} align={'center'} small={true}> | ||
This page requires a connection to your wallet, please switch to a desktop device. | ||
</Text> | ||
|
||
<Density compact={true}> | ||
{/* Copy Link Button */} | ||
<Button | ||
onClick={() => { | ||
// We discard the promise using void, | ||
// because Button only expects void-returning functions. | ||
void (async () => { | ||
/* Write the current url to clipboard */ | ||
const currentUrl = window.location.href; | ||
await navigator.clipboard.writeText(currentUrl); | ||
})(); | ||
}} | ||
> | ||
Copy Link | ||
</Button> | ||
</Density> | ||
</div> | ||
|
||
{/* Go Back Button */} | ||
<Button> | ||
<Text body>Go Back</Text> | ||
</Button> | ||
</section> | ||
); | ||
}; | ||
} | ||
|
||
function DesktopPortfolioPage() { | ||
return 'Hi from desktop!'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.