Skip to content

Commit 858a3bd

Browse files
committed
Add Safenet to NetworkLogosList
1 parent d6eeff6 commit 858a3bd

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

apps/web/src/components/sidebar/Sidebar/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ const Sidebar = (): ReactElement => {
3535
<Box className={css.safenetHeader}>
3636
<SafenetLogo height="14" />
3737
</Box>
38-
) : <ChainIndicator showLogo={false} />}
38+
) : (
39+
<ChainIndicator showLogo={false} />
40+
)}
3941

4042
{/* Open the safes list */}
4143
<button data-testid="open-safes-icon" className={css.drawerButton} onClick={onDrawerToggle}>

apps/web/src/features/multichain/components/NetworkLogosList/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
import ChainIndicator from '@/components/common/ChainIndicator'
2+
import SafeLogo from '@/public/images/logo-no-text.svg'
23
import { Box } from '@mui/material'
34
import type { ChainInfo } from '@safe-global/safe-gateway-typescript-sdk'
45
import css from './styles.module.css'
56

67
const NetworkLogosList = ({
78
networks,
89
showHasMore = false,
10+
showHasSafenet = false,
911
}: {
1012
networks: Pick<ChainInfo, 'chainId'>[]
1113
showHasMore?: boolean
14+
showHasSafenet?: boolean
1215
}) => {
13-
const MAX_NUM_VISIBLE_CHAINS = 4
16+
const MAX_NUM_VISIBLE_CHAINS = showHasSafenet ? 3 : 4
1417
const visibleChains = showHasMore ? networks.slice(0, MAX_NUM_VISIBLE_CHAINS) : networks
1518

1619
return (
1720
<Box className={css.networks}>
1821
{visibleChains.map((chain) => (
1922
<ChainIndicator key={chain.chainId} chainId={chain.chainId} onlyLogo inline />
2023
))}
24+
{showHasSafenet && (
25+
<Box className={css.safenetIndicator}>
26+
<SafeLogo height="14" />
27+
</Box>
28+
)}
2129
{showHasMore && networks.length > MAX_NUM_VISIBLE_CHAINS && (
2230
<Box className={css.moreChainsIndicator}>+{networks.length - MAX_NUM_VISIBLE_CHAINS}</Box>
2331
)}

apps/web/src/features/multichain/components/NetworkLogosList/styles.module.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@
2323
justify-content: center;
2424
font-size: 14px;
2525
}
26+
27+
.safenetIndicator {
28+
background: radial-gradient(119.01% 132.63% at 119.01% -14.15%, #FF5F00 0%, #FFD200 50%, #12FF80 100%);
29+
margin-left: -5px;
30+
width: 24px;
31+
height: 24px;
32+
border-radius: 50%;
33+
outline: 2px solid var(--color-background-paper);
34+
display: flex;
35+
align-items: center;
36+
justify-content: center;
37+
font-size: 14px;
38+
}

0 commit comments

Comments
 (0)