Skip to content

Commit 3f58c67

Browse files
corwintineswackerow
andcommitted
refactor out Translation component where possible
Co-authored-by: Corwin Smith <[email protected]> Co-authored-by: Paul Wackerow <[email protected]>
1 parent 9f23bdc commit 3f58c67

File tree

1 file changed

+70
-79
lines changed

1 file changed

+70
-79
lines changed

src/pages/wallets/index.tsx

Lines changed: 70 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -127,85 +127,6 @@ const CalloutCardContainer = (props: ChildOnlyProp) => (
127127
<CardContainer mt={16} {...props} />
128128
)
129129

130-
const cards = [
131-
{
132-
emoji: ":dollar:",
133-
title: <Translation id="page-wallets:page-wallets-manage-funds" />,
134-
description: (
135-
<Translation id="page-wallets:page-wallets-manage-funds-desc" />
136-
),
137-
},
138-
{
139-
emoji: ":frame_with_picture:",
140-
title: <Translation id="page-wallets:page-wallets-your-ethereum-account" />,
141-
description: (
142-
<Translation id="page-wallets:page-wallets-your-ethereum-account-desc" />
143-
),
144-
},
145-
{
146-
emoji: ":bust_in_silhouette:",
147-
title: <Translation id="page-wallets:page-wallets-your-login" />,
148-
description: <Translation id="page-wallets:page-wallets-your-login-desc" />,
149-
},
150-
]
151-
152-
const types = [
153-
{
154-
emoji: ":cd:",
155-
description: <Translation id="page-wallets:page-wallets-cd" />,
156-
},
157-
{
158-
emoji: ":mobile_phone:",
159-
description: <Translation id="page-wallets:page-wallets-mobile" />,
160-
},
161-
{
162-
emoji: ":globe_with_meridians:",
163-
description: <Translation id="page-wallets:page-wallets-web-browser" />,
164-
},
165-
{
166-
emoji: ":globe_with_meridians:",
167-
description: (
168-
<Translation id="page-wallets:page-wallets-web-browser-extension" />
169-
),
170-
},
171-
{
172-
emoji: ":desktop_computer:",
173-
description: <Translation id="page-wallets:page-wallets-desktop" />,
174-
},
175-
]
176-
177-
const articles = [
178-
{
179-
title: <Translation id="page-wallets:page-wallets-protecting-yourself" />,
180-
description: "MyCrypto",
181-
link: "https://support.mycrypto.com/staying-safe/protecting-yourself-and-your-funds",
182-
},
183-
{
184-
title: <Translation id="page-wallets:page-wallets-keys-to-safety" />,
185-
description: <Translation id="page-wallets:page-wallets-blog" />,
186-
link: "https://www.coinbase.com/learn/crypto-basics/how-to-secure-crypto",
187-
},
188-
{
189-
title: <Translation id="page-wallets:page-wallets-how-to-store" />,
190-
description: "ConsenSys",
191-
link: "https://media.consensys.net/how-to-store-digital-assets-on-ethereum-a2bfdcf66bd0",
192-
},
193-
]
194-
195-
const guides = [
196-
{
197-
title: (
198-
<Translation id="page-wallets:additional-reading-how-to-create-an-ethereum-account" />
199-
),
200-
link: "/guides/how-to-create-an-ethereum-account/",
201-
},
202-
{
203-
title: (
204-
<Translation id="page-wallets:additional-reading-how-to-use-a-wallet" />
205-
),
206-
link: "/guides/how-to-use-a-wallet/",
207-
},
208-
]
209130

210131
type Props = SSRConfig & {
211132
lastDeployDate: string
@@ -272,6 +193,76 @@ const WalletsPage = () => {
272193
],
273194
}
274195

196+
const cards = [
197+
{
198+
emoji: ":dollar:",
199+
title: t("page-wallets-manage-funds"),
200+
description: t("page-wallets-manage-funds-desc"),
201+
},
202+
{
203+
emoji: ":frame_with_picture:",
204+
title: t("page-wallets-your-ethereum-account"),
205+
description: t("page-wallets-your-ethereum-account-desc"),
206+
},
207+
{
208+
emoji: ":bust_in_silhouette:",
209+
title: t("page-wallets-your-login"),
210+
description: t("page-wallets-your-login-desc"),
211+
},
212+
]
213+
214+
const types = [
215+
{
216+
emoji: ":cd:",
217+
description: t("page-wallets-cd"),
218+
},
219+
{
220+
emoji: ":mobile_phone:",
221+
description: t("page-wallets-mobile"),
222+
},
223+
{
224+
emoji: ":globe_with_meridians:",
225+
description: t("page-wallets-web-browser"),
226+
},
227+
{
228+
emoji: ":globe_with_meridians:",
229+
description: t("page-wallets-web-browser-extension"),
230+
},
231+
{
232+
emoji: ":desktop_computer:",
233+
description: t("page-wallets-desktop"),
234+
},
235+
]
236+
237+
const articles = [
238+
{
239+
title: t("page-wallets-protecting-yourself"),
240+
description: "MyCrypto",
241+
link: "https://support.mycrypto.com/staying-safe/protecting-yourself-and-your-funds",
242+
},
243+
{
244+
title: t("page-wallets-keys-to-safety"),
245+
description: t("page-wallets-blog"),
246+
link: "https://www.coinbase.com/learn/crypto-basics/how-to-secure-crypto",
247+
},
248+
{
249+
title: t("page-wallets-how-to-store"),
250+
description: "ConsenSys",
251+
link: "https://media.consensys.net/how-to-store-digital-assets-on-ethereum-a2bfdcf66bd0",
252+
},
253+
]
254+
255+
const guides = [
256+
{
257+
title: t("additional-reading-how-to-create-an-ethereum-account"),
258+
link: "/guides/how-to-create-an-ethereum-account/",
259+
},
260+
{
261+
title: t("additional-reading-how-to-use-a-wallet"),
262+
link: "/guides/how-to-use-a-wallet/",
263+
},
264+
]
265+
275266
return (
276267
<Page>
277268
<PageMetadata

0 commit comments

Comments
 (0)