-
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.
- Loading branch information
1 parent
3e7007a
commit bf528ae
Showing
20 changed files
with
343 additions
and
143 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
packages/app-ui/src/components/layout/Navigation/NavigationActions.module.scss
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 @@ | ||
button.walletButtonMock { | ||
min-height: auto; | ||
line-height: 22px; | ||
height: 40px; | ||
min-width: 40px; | ||
width: auto; | ||
box-shadow: var(--shadow-depth-1); | ||
background-color: var(--color-neutral-10); | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/app-ui/src/components/layout/Navigation/NavigationActions.module.scss.d.ts
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 @@ | ||
export type Styles = { | ||
walletButtonMock: string | ||
} | ||
|
||
export type ClassNames = keyof Styles | ||
|
||
declare const styles: Styles | ||
|
||
export default styles |
33 changes: 30 additions & 3 deletions
33
packages/app-ui/src/components/layout/Navigation/NavigationActions.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,5 +1,32 @@ | ||
interface NavigationActionsProps {} | ||
import classNames from 'classNames' | ||
|
||
export const NavigationActions = () => { | ||
return <div>NavigationActions</div> | ||
import { Button } from '@/components/atoms/Button/Button' | ||
import { LoadingSpinner } from '@/components/molecules/Loader/Loader' | ||
|
||
import navigationActionStyles from '@/components/layout/Navigation/NavigationActions.module.scss' | ||
|
||
interface NavigationActionsProps { | ||
walletConnectionComponent?: React.ReactNode | ||
} | ||
|
||
export const NavigationActions = ({ walletConnectionComponent }: NavigationActionsProps) => { | ||
return ( | ||
walletConnectionComponent ?? ( | ||
<div> | ||
<Button | ||
variant="secondarySmall" | ||
className={classNames(navigationActionStyles.walletButtonMock)} | ||
> | ||
<LoadingSpinner | ||
size={24} | ||
color="var(--color-interactive-50)" | ||
style={{ | ||
marginRight: 'var(--space-xxl)', | ||
marginLeft: 'var(--space-xxl)', | ||
}} | ||
/> | ||
</Button> | ||
</div> | ||
) | ||
) | ||
} |
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.