-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
56 changed files
with
815 additions
and
330 deletions.
There are no files selected for viewing
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
43 changes: 35 additions & 8 deletions
43
apps/rays-dashboard/components/layout/Navigation/NavigationWrapper.tsx
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,28 +1,55 @@ | ||
'use client' | ||
|
||
import { FC } from 'react' | ||
import { Navigation, NavigationMenuPanelType } from '@summerfi/app-ui' | ||
import { Button, LoadingSpinner, Navigation, NavigationMenuPanelType, Text } from '@summerfi/app-ui' | ||
import { usePathname } from 'next/navigation' | ||
|
||
interface NavigationWrapperProps { | ||
panels?: NavigationMenuPanelType[] | ||
connectedWalletAddress?: string | ||
} | ||
const NavigationModuleBridge = () => <LoadingSpinner /> | ||
const NavigationModuleSwap = () => <LoadingSpinner /> | ||
|
||
export const NavigationWrapper: FC<NavigationWrapperProps> = ({ panels }) => { | ||
export const NavigationWrapper: FC<NavigationWrapperProps> = ({ | ||
panels, | ||
connectedWalletAddress, | ||
}) => { | ||
const currentPath = usePathname() | ||
|
||
return ( | ||
<Navigation | ||
currentPath={currentPath} | ||
logo="img/branding/logo-dark.svg" | ||
logoSmall="img/branding/dot-dark.svg" | ||
links={[ | ||
{ | ||
label: 'Portfolio', | ||
link: '/#', | ||
}, | ||
]} | ||
links={ | ||
connectedWalletAddress | ||
? [ | ||
{ | ||
label: 'Portfolio', | ||
link: `/portfolio/${connectedWalletAddress}`, | ||
}, | ||
] | ||
: undefined | ||
} | ||
panels={panels} | ||
navigationModules={{ | ||
NavigationModuleBridge, | ||
NavigationModuleSwap, | ||
}} | ||
walletConnectionComponent={ | ||
<Button variant="secondarySmall" style={{ backgroundColor: 'var(--color-neutral-10)' }}> | ||
<Text | ||
variant="p4" | ||
style={{ | ||
marginRight: 'var(--space-xl)', | ||
marginLeft: 'var(--space-xl)', | ||
}} | ||
> | ||
loaded wallet :) | ||
</Text> | ||
</Button> | ||
} | ||
/> | ||
) | ||
} |
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
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.