-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Navbar and ServiceCard components
- Loading branch information
1 parent
088beec
commit 32ec04d
Showing
7 changed files
with
68 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
import { Flex } from 'antd'; | ||
import { SettingsButton } from './SettingsButton'; | ||
import { NotificationButton } from './NotificationButton'; | ||
import Image from 'next/image'; | ||
|
||
export const Navbar = () => { | ||
return ( | ||
<Flex vertical={false} justify="space-between" style={{ minWidth: '100%' }}> | ||
<Image src="/olas-logo.png" alt="" width={100} height={25} /> | ||
<Flex gap={4}> | ||
<NotificationButton disabled /> | ||
<SettingsButton disabled /> | ||
</Flex> | ||
</Flex> | ||
); | ||
}; |
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
36 changes: 36 additions & 0 deletions
36
frontend/components/YourAgents/ServiceCard/ServiceCardSettings.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { SpawnScreen } from '@/enums'; | ||
import { SettingOutlined } from '@ant-design/icons'; | ||
import { Button, Dropdown, MenuProps } from 'antd'; | ||
import Link from 'next/link'; | ||
import { useMemo } from 'react'; | ||
|
||
export const ServiceCardSettings = ({ | ||
serviceHash, | ||
}: { | ||
serviceHash: string; | ||
}) => { | ||
const items: MenuProps['items'] = useMemo( | ||
() => [ | ||
{ | ||
key: '1', | ||
label: ( | ||
<Link | ||
href={`/spawn/${serviceHash}?screen=${SpawnScreen.AGENT_FUNDING}`} | ||
> | ||
Fund agent | ||
</Link> | ||
), | ||
}, | ||
{ key: '2', label: <Link href="#">Delete Agent</Link>, danger: true }, | ||
], | ||
[serviceHash], | ||
); | ||
|
||
return ( | ||
<Dropdown menu={{ items }} trigger={['click']} placement="bottomRight"> | ||
<Button style={{ position: 'absolute', top: 0, right: 0 }} type="text"> | ||
<SettingOutlined /> | ||
</Button> | ||
</Dropdown> | ||
); | ||
}; |
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