Skip to content

Commit

Permalink
Update remove wallet block
Browse files Browse the repository at this point in the history
  • Loading branch information
nuno-aac committed Oct 26, 2023
1 parent f084085 commit dbe3b4d
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 85 deletions.
2 changes: 1 addition & 1 deletion _data/pages/block-explorers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ blocks:
link_url: https://www.oklink.com/starknet
website_url: https://www.oklink.com/starknet
image: /assets/oklink-logo.jpeg
discordHandle: ""
discord: ""
twitter: https://twitter.com/OKLink
title: Block explorers
randomize: true
Expand Down
56 changes: 55 additions & 1 deletion _data/pages/wallets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,58 @@ blocks:
title: Wallets
description: "Explore the wallets that allow you to interact with and build in
the Starknet ecosystem. "
- type: wallets
- type: card_list
randomize: false
card_list_items:
- title: Argent X
description: Earn, stake and trade with low fees, high speeds & strong security.
link_url: https://www.argent.xyz/argent-x/
website_url: https://www.argent.xyz/argent-x/
discord: https://discord.gg/8yVmtsgtgm
twitter: https://twitter.com/argentHQ
image: /assets/argent.jpg
type_list:
- type: Browser Extension
url: https://chrome.google.com/webstore/detail/argent-x/dlcobpjiigpikoobohmabehhmhfoodbb
- type: ios
url: https://apps.apple.com/us/app/argent-defi-in-a-tap/id1358741926
- type: Android
url: https://play.google.com/store/apps/details?id=im.argent.contractwalletclient
- type: SDK
url: https://www.argent.xyz/web-wallet-sdk
- title: OKX
description: World's leading Web3 multi-chain wallet.
website_url: https://www.okx.com/web3
discord: https://discord.com/invite/okx
twitter: https://twitter.com/okxweb3
type_list:
- type: Browser Extension
url: https://chrome.google.com/webstore/detail/okx-wallet/mcohilncbfahbmgdjkbpemcciiolgcge
- type: ios
url: https://apps.apple.com/us/app/okx-buy-bitcoin-eth-crypto/id1327268470
- type: Android
url: https://play.google.com/store/apps/details?id=com.okinc.okex.gp
image: /assets/unnamed.jpg
- title: MetaMask Snaps
description: Manage your Starknet assets with MetaMask
link_url: https://snaps.consensys.io/starknet
image: /assets/starkware-metamask.png
website_url: https://snaps.consensys.io/starknet
twitter: https://twitter.com/MetaMask
discord: https://discord.com/invite/consensys
- image: /assets/braavos.jpg
title: Braavos
link_url: https://braavos.app
description: " Braavos Smart Wallet offers an unparalleled UX and advance
security via its Hardware Signer 2-factor authentication and
multi-signer 3-factor authentication capabilities."
website_url: https://braavos.app
twitter: https://twitter.com/myBraavos
discord: https://discord.com/invite/bFvwjYhuqp
type_list:
- type: Browser Extension
url: https://chrome.google.com/webstore/detail/braavos-smart-wallet/jnlgamecbpmbajjfhmmmlhejkemejdma
- type: ios
url: https://apps.apple.com/us/app/braavos-wallet/id1636013523
- type: Android
url: https://play.google.com/store/apps/details?id=app.braavos.wallet
21 changes: 2 additions & 19 deletions workspaces/cms-config/src/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ export const cardListItem = [
meta: false
},
{
label: "Discord handle",
name: "discordHandle",
label: "Discord",
name: "discord",
required: false,
widget: "string",
index_file: "",
Expand Down Expand Up @@ -330,23 +330,6 @@ export const blocks = [
},
],
},
{
name: "wallets",
label: "Wallets block",
widget: "object",
fields: [
{
name: "type",
widget: "hidden",
},
{
name: "no_of_items",
required: false,
widget: "string",
crowdin: false
},
],
},
{
name: "basic_card",
label: "Basic card",
Expand Down
10 changes: 5 additions & 5 deletions workspaces/cms-data/src/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ export interface AmbassadorsListBlock {
readonly type: "ambassadors_list";
}

export interface WalletsBlock {
readonly type: "wallets";
readonly no_of_items: number;
}
export interface BasicCardBlock {
readonly type: "basic_card";
readonly title: string;
Expand Down Expand Up @@ -51,12 +47,17 @@ interface Icon {

interface ListCardItems {
title: string;
discord: string;
description: string;
linkUrl: string;
icons: Icon;
website_url: string;
twitter: string;
image: string;
type_list: {
type: string;
url: string;
}[];
}
export interface ListCardItemsBlock {
readonly type: "card_list";
Expand Down Expand Up @@ -152,7 +153,6 @@ export type HeadingVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
export type Block =
| MarkdownBlock
| CommunityEventsBlock
| WalletsBlock
| BasicCardBlock
| ImageIconLinkCardBlock
| HeroBlock
Expand Down
9 changes: 0 additions & 9 deletions workspaces/website/src/blocks/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { HeroImage } from "@ui/HeroImage/HeroImage";
import { BlockGrouping } from "./BlockGrouping";
import { ImageIconCard } from "../components/Card/ImageIconCard";
import ListCardItems from "./ListCardItems";
import BlockWallets from "./dataBlocks/BlockWallets/BlockWallets";
import { Container } from "./Container";
import { LinkList } from "./LinkList";
import { AccordionItem, AccordionRoot } from "./AccordionBlock";
Expand Down Expand Up @@ -156,14 +155,6 @@ export function Block({ block, locale }: Props): JSX.Element | null {
}}
/>
);
} else if (block.type === "wallets") {
return (
<BlockWallets
params={{
locale,
}}
/>
);
} else {
// this will report type error if there is unhandled block.type
block satisfies never;
Expand Down
7 changes: 2 additions & 5 deletions workspaces/website/src/blocks/ListCardItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Icon {
interface ListCardItems {
title: string;
description: string;
discord: string;
linkUrl: string;
icons: Icon;
website_url: string;
Expand Down Expand Up @@ -47,12 +48,8 @@ Props): JSX.Element {
return (
<ListCard
href={card.website_url}
twitterHandle={card.twitter}
image={card.image}
key={`${card.title}-${i}`}
description={card.description}
title={card.title}
type_list={card.type_list}
{...card}
/>
);
})}
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion workspaces/website/src/components/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ export const Listcard = () => (
city={hit.city}
country={hit.country}
twitterHandle={hit.twitter}
discordHandle={hit.discord}
discord={hit.discord}
recap={hit.recap}
/>
);
Expand Down
6 changes: 3 additions & 3 deletions workspaces/website/src/components/Card/ListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Props = {
readonly country?: string;
readonly venue?: string;
readonly twitterHandle?: string;
readonly discordHandle?: string;
readonly discord?: string;
readonly variant?: "default" | "dapp" | "event" | "job" | "wallet";
readonly type_list?: Type[];
readonly type?: string[];
Expand Down Expand Up @@ -228,10 +228,10 @@ export const ListCard = (props: Props) => {
/>
</Link>
)}
{props.discordHandle && (
{props.discord && (
<Link
isExternal
href={`${props.discordHandle}`}
href={`${props.discord}`}
>
<Icon
boxSize="18px"
Expand Down

0 comments on commit dbe3b4d

Please sign in to comment.