Skip to content

Commit 0110633

Browse files
authored
Merge pull request #164 from oasisprotocol/ml/discover/labels
discover: Remove labels
2 parents 90b8f00 + a7a0a8e commit 0110633

File tree

5 files changed

+76
-78
lines changed

5 files changed

+76
-78
lines changed

discover/src/constants/config.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@
33
* SPDX-License-Identifier: CC BY
44
*/
55

6-
import { CardConfig, CardConfigLabel } from '@oasisprotocol/rose-app-ui/discover'
6+
import { CardConfig } from '@oasisprotocol/rose-app-ui/discover'
77

88
export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; tooling: CardConfig[] } = {
99
featured: [
1010
{
1111
title: 'NEBY',
1212
type: 'DEX',
1313
imgSrc: '/discover/Neby.png',
14-
labels: [CardConfigLabel.Grant],
1514
externalLink: 'https://www.neby.exchange/',
1615
},
1716
{
1817
title: 'Accumulated Finance',
1918
type: 'Liquid staking',
2019
imgSrc: '/discover/AccumulatedFinance.png',
21-
labels: [CardConfigLabel.Grant],
2220
externalLink: 'https://accumulated.finance/',
2321
},
2422
{
@@ -33,14 +31,12 @@ export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; toolin
3331
title: 'Thorn Protocol',
3432
type: 'StableSwap',
3533
imgSrc: '/discover/ThornProtocol.jpg',
36-
labels: [CardConfigLabel.Grant],
3734
externalLink: 'https://thornprotocol.com/',
3835
},
3936
{
4037
title: 'Daosis',
4138
type: 'Launchpad & Token Minter',
4239
imgSrc: '/discover/Daosis.jpg',
43-
labels: [CardConfigLabel.Grant],
4440
externalLink: 'https://daosis.io/',
4541
},
4642
{
@@ -65,35 +61,30 @@ export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; toolin
6561
title: 'Predictoor',
6662
type: 'Predictions',
6763
imgSrc: '/discover/Predictoor.jpg',
68-
labels: [CardConfigLabel.Grant],
6964
externalLink: 'https://www.predictoor.ai/',
7065
},
7166
{
7267
title: 'Pixel Realm',
7368
type: 'NFT Marketplace & Gaming Incubator',
7469
imgSrc: '/discover/PixelRealm.jpg',
75-
labels: [CardConfigLabel.Grant],
7670
externalLink: 'https://app.pixelrealm.io/',
7771
},
7872
{
7973
title: 'Protocol Monster Labs',
8074
type: 'Gaming',
8175
imgSrc: '/discover/ProtocolMonsterLabs.jpg',
82-
labels: [CardConfigLabel.Grant],
8376
externalLink: 'https://protocolmonsterlabs.com/',
8477
},
8578
{
8679
title: 'Oasis Safe',
8780
type: 'Multisig Wallet',
8881
imgSrc: '/discover/OasisSafe.svg',
89-
labels: [CardConfigLabel.Grant],
9082
externalLink: 'https://safe.oasis.io/welcome',
9183
},
9284
{
9385
title: 'Midas',
9486
type: 'RWA Yield',
9587
imgSrc: '/discover/Midas.jpg',
96-
labels: [CardConfigLabel.Grant],
9788
externalLink: 'https://midas.app/',
9889
},
9990
{
@@ -114,7 +105,6 @@ export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; toolin
114105
title: 'Router Bridge',
115106
type: 'Bridge',
116107
imgSrc: '/discover/Router.jpg',
117-
labels: [CardConfigLabel.Grant],
118108
externalLink: 'https://app.routernitro.com/swap',
119109
},
120110
{
@@ -142,7 +132,6 @@ export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; toolin
142132
title: 'illuminex',
143133
type: 'Privacy Wallet',
144134
imgSrc: '/discover/illumineX.jpg',
145-
labels: [CardConfigLabel.Grant],
146135
externalLink: 'https://illuminex.xyz/',
147136
},
148137
{
@@ -158,7 +147,6 @@ export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; toolin
158147
{
159148
title: 'Transak',
160149
imgSrc: '/discover/Transak.jpg',
161-
labels: [CardConfigLabel.Grant],
162150
externalLink: 'https://global.transak.com/',
163151
},
164152
{
@@ -175,28 +163,24 @@ export const CARDS_CONFIG: { featured: CardConfig[]; dApps: CardConfig[]; toolin
175163
title: 'Reclaim Protocol',
176164
type: 'SDK',
177165
imgSrc: '/discover/ReclaimProtocol.svg',
178-
labels: [CardConfigLabel.Grant],
179166
externalLink: 'https://www.reclaimprotocol.org/',
180167
},
181168
{
182169
title: 'RA1L',
183170
type: 'DID',
184171
imgSrc: '/discover/Ra1l.jpg',
185-
labels: [CardConfigLabel.Grant],
186172
externalLink: 'https://ra1l.com/',
187173
},
188174
{
189175
title: 'OWallet',
190176
type: 'Wallet',
191177
imgSrc: '/discover/OWallet.jpg',
192-
labels: [CardConfigLabel.Grant],
193178
externalLink: 'https://owallet.io/',
194179
},
195180
{
196181
title: 'Safepal',
197182
type: 'Wallet',
198183
imgSrc: '/discover/SafePal.png',
199-
labels: [CardConfigLabel.Grant],
200184
externalLink: 'https://safepal.com/en/',
201185
},
202186
{

pnpm-lock.yaml

Lines changed: 57 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@oasisprotocol/rose-app-subcall": "workspace:*",
2525
"@rainbow-me/rainbowkit": "^2.1.2",
2626
"bignumber.js": "^9.1.2",
27-
"lucide-react": "^0.468.0",
2827
"react": "^18.2.0",
2928
"react-responsive": "^9.0.2",
3029
"react-router-dom": "^6.22.2",
Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,27 @@
1-
import { FC, ReactNode } from 'react'
2-
import { Coins } from 'lucide-react'
3-
import { CardConfig, CardConfigLabel } from '../../types'
1+
import { FC } from 'react'
2+
import { CardConfig } from '../../types'
43
import classes from './index.module.css'
54

65
interface Props extends CardConfig {
76
className?: string
87
isFeatured?: boolean
98
}
109

11-
const cardConfigLabelMap: { [key in CardConfigLabel]: (isFeatured?: boolean) => ReactNode } = {
12-
[CardConfigLabel.Grant]: isFeatured => (
13-
<p className={`${classes.grantRecipient} text-sm ${isFeatured ? 'medium' : 'regular'}`}>
14-
<Coins size={13.33} />
15-
&nbsp; Grant Recipient
16-
</p>
17-
),
18-
}
19-
20-
export const Card: FC<Props> = ({ externalLink, labels, title, imgSrc, type, className, isFeatured }) => {
21-
const label = labels?.length ? cardConfigLabelMap[labels[0]](isFeatured) : null
22-
23-
return (
24-
<a className={classes.externalLink} href={externalLink} rel="noopener noreferrer" target="_blank">
25-
<div
26-
className={`${classes.card} ${isFeatured ? classes.isFeatured : ''} ${className}`}
27-
style={isFeatured ? { backgroundImage: `url(${imgSrc})` } : undefined}
28-
>
29-
{!isFeatured && (
30-
<div className={classes.thumbnail}>
31-
<img src={imgSrc} alt={title} />
32-
</div>
33-
)}
34-
<div className={classes.description}>
35-
<p className={isFeatured ? 'text-xl medium' : 'text-base medium'}>{title}</p>
36-
{label}
37-
{type && (
38-
<p className={`${classes.type} text-sm regular`}>
39-
{isFeatured && label ? <span>&nbsp;•&nbsp;</span> : null}
40-
{type}
41-
</p>
42-
)}
10+
export const Card: FC<Props> = ({ externalLink, title, imgSrc, type, className, isFeatured }) => (
11+
<a className={classes.externalLink} href={externalLink} rel="noopener noreferrer" target="_blank">
12+
<div
13+
className={`${classes.card} ${isFeatured ? classes.isFeatured : ''} ${className}`}
14+
style={isFeatured ? { backgroundImage: `url(${imgSrc})` } : undefined}
15+
>
16+
{!isFeatured && (
17+
<div className={classes.thumbnail}>
18+
<img src={imgSrc} alt={title} />
4319
</div>
20+
)}
21+
<div className={classes.description}>
22+
<p className={isFeatured ? 'text-xl medium' : 'text-base medium'}>{title}</p>
23+
{type && <p className={`${classes.type} text-sm regular`}>{type}</p>}
4424
</div>
45-
</a>
46-
)
47-
}
25+
</div>
26+
</a>
27+
)

ui/src/discover/types/card-config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
export enum CardConfigLabel {
2-
Grant = 'grant',
3-
}
4-
51
export interface CardConfig {
62
title: string
7-
labels?: CardConfigLabel[]
83
type?: string
94
imgSrc: string
105
externalLink: string

0 commit comments

Comments
 (0)