Skip to content

Commit 10febb3

Browse files
committed
Merge branch 'dev' into nav-menu-radix-ui
2 parents fc35ae7 + a24037d commit 10febb3

File tree

8 files changed

+26
-243
lines changed

8 files changed

+26
-243
lines changed

public/wallets/aktionariat.png

-774 Bytes
Binary file not shown.

public/wallets/numio.png

-1.89 KB
Binary file not shown.

public/wallets/opera.png

-1.16 KB
Binary file not shown.

public/wallets/portis.png

-2.07 KB
Binary file not shown.

public/wallets/sequence.png

-3.3 KB
Binary file not shown.

src/components/PageMetadata.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { join } from "path"
2-
31
import Head from "next/head"
42
import { useRouter } from "next/router"
53
import { useTranslation } from "next-i18next"
64

75
import { getOgImage } from "@/lib/utils/metadata"
6+
import { filterRealLocales } from "@/lib/utils/translations"
7+
import { getFullUrl } from "@/lib/utils/url"
88

9-
import { DEFAULT_LOCALE, SITE_URL } from "@/lib/constants"
9+
import { SITE_URL } from "@/lib/constants"
1010

1111
type NameMeta = {
1212
name: string
@@ -35,9 +35,11 @@ const PageMetadata = ({
3535
canonicalUrl,
3636
author,
3737
}: PageMetadataProps) => {
38-
const { locale, asPath } = useRouter()
38+
const { locale, locales: rawLocales, asPath } = useRouter()
3939
const { t } = useTranslation()
4040

41+
const locales = filterRealLocales(rawLocales)
42+
4143
const desc = description || t("site-description")
4244
const siteTitle = t("site-title")
4345
const fullTitle = `${title} | ${siteTitle}`
@@ -47,7 +49,7 @@ const PageMetadata = ({
4749
const slug = path.split("/")
4850

4951
// Set canonical URL w/ language path to avoid duplicate content
50-
const url = new URL(join(locale!, path), SITE_URL).href
52+
const url = getFullUrl(locale, path)
5153
const canonical = canonicalUrl || url
5254

5355
/* Set fallback ogImage based on path */
@@ -83,6 +85,14 @@ const PageMetadata = ({
8385
/>
8486
))}
8587
<link rel="canonical" key={canonical} href={canonical} />
88+
{locales.map((loc) => (
89+
<link
90+
key={loc}
91+
rel="alternate"
92+
hrefLang={loc}
93+
href={getFullUrl(loc, path)}
94+
/>
95+
))}
8696
</Head>
8797
)
8898
}

src/data/wallets/wallet-data.ts

Lines changed: 0 additions & 235 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { StaticImageData } from "next/image"
22

33
import OneInchWalletImage from "@/public/wallets/1inch.png"
44
import AirgapImage from "@/public/wallets/airgap.png"
5-
import AktionariatImage from "@/public/wallets/aktionariat.png"
65
import AlphaWalletImage from "@/public/wallets/alpha.png"
76
import AmbireImage from "@/public/wallets/ambire.png"
87
import ApexImage from "@/public/wallets/apex.png"
@@ -29,17 +28,13 @@ import LoopringImage from "@/public/wallets/loopring.png"
2928
import MetaMaskImage from "@/public/wallets/metamask.png"
3029
import MewImage from "@/public/wallets/mew.png"
3130
import MyEtherWalletImage from "@/public/wallets/myetherwallet.png"
32-
import NumioImage from "@/public/wallets/numio.png"
3331
import OKXImage from "@/public/wallets/okx.jpeg"
3432
import OneKeyImage from "@/public/wallets/onekey.png"
35-
import OperaImage from "@/public/wallets/opera.png"
3633
import PhantomImage from "@/public/wallets/phantom.png"
3734
import PillarImage from "@/public/wallets/pillar.png"
38-
import PortisImage from "@/public/wallets/portis.png"
3935
import RabbyWalletImage from "@/public/wallets/rabbywallet.png"
4036
import RainbowImage from "@/public/wallets/rainbow.png"
4137
import SafeImage from "@/public/wallets/safe.png"
42-
import SequenceImage from "@/public/wallets/sequence.png"
4338
import TahoImage from "@/public/wallets/taho.png"
4439
import TokenPocketImage from "@/public/wallets/tokenpocket.png"
4540
import TorusImage from "@/public/wallets/torus.png"
@@ -146,51 +141,6 @@ const walletData: WalletData[] = [
146141
onboard_documentation: "https://support.keyst.one/",
147142
documentation: "",
148143
},
149-
{
150-
last_updated: "June 22, 2022",
151-
name: "Numio",
152-
image: NumioImage,
153-
brand_color: "#3F3F3F",
154-
url: "https://www.numio.one/",
155-
wallet_live_date: "December 2020",
156-
active_development_team: true,
157-
languages_supported: ["en"],
158-
twitter: "https://twitter.com/GetNumio/",
159-
discord: "",
160-
reddit: "",
161-
telegram: "",
162-
ios: true,
163-
android: true,
164-
linux: false,
165-
windows: false,
166-
macOS: false,
167-
firefox: false,
168-
chromium: false,
169-
hardware: false,
170-
open_source: false,
171-
repo_url: "",
172-
non_custodial: true,
173-
security_audit: [],
174-
scam_protection: false,
175-
hardware_support: false,
176-
walletconnect: true,
177-
rpc_importing: false,
178-
nft_support: true,
179-
connect_to_dapps: true,
180-
staking: false,
181-
swaps: true,
182-
layer_2: true,
183-
gas_fee_customization: false,
184-
ens_support: false,
185-
erc_20_support: false,
186-
eip_1559_support: false,
187-
buy_crypto: true,
188-
withdraw_crypto: false,
189-
multisig: false,
190-
social_recovery: false,
191-
onboard_documentation: "https://docs.numio.one/",
192-
documentation: "",
193-
},
194144
{
195145
last_updated: "June 22, 2022",
196146
name: "Coin98",
@@ -393,51 +343,6 @@ const walletData: WalletData[] = [
393343
onboard_documentation: "https://www.argent.xyz/learn/",
394344
documentation: "",
395345
},
396-
{
397-
last_updated: "June 22, 2022",
398-
name: "Portis",
399-
image: PortisImage,
400-
brand_color: "#ffffff",
401-
url: "https://www.portis.io",
402-
wallet_live_date: "Nov, 2018",
403-
active_development_team: true,
404-
languages_supported: ["en"],
405-
twitter: "https://twitter.com/portis_io",
406-
discord: "",
407-
reddit: "",
408-
telegram: "https://t.me/PortisHQ",
409-
ios: false,
410-
android: false,
411-
linux: false,
412-
windows: false,
413-
macOS: false,
414-
firefox: false,
415-
chromium: false,
416-
hardware: false,
417-
open_source: false,
418-
repo_url: "",
419-
non_custodial: true,
420-
security_audit: [],
421-
scam_protection: false,
422-
hardware_support: false,
423-
walletconnect: false,
424-
rpc_importing: true,
425-
nft_support: true,
426-
connect_to_dapps: true,
427-
staking: false,
428-
swaps: false,
429-
layer_2: true,
430-
gas_fee_customization: false,
431-
ens_support: false,
432-
erc_20_support: true,
433-
eip_1559_support: false,
434-
buy_crypto: true,
435-
withdraw_crypto: false,
436-
multisig: false,
437-
social_recovery: false,
438-
onboard_documentation: "https://docs.portis.io/",
439-
documentation: "",
440-
},
441346
{
442347
last_updated: "November 15, 2022",
443348
name: "Coinbase Wallet",
@@ -1174,52 +1079,6 @@ const walletData: WalletData[] = [
11741079
onboard_documentation: "https://alphawallet.zendesk.com/hc/en-us",
11751080
documentation: "",
11761081
},
1177-
{
1178-
last_updated: "June 24, 2022",
1179-
name: "Opera wallet",
1180-
image: OperaImage,
1181-
brand_color: "#ffffff",
1182-
url: "https://crypto.opera.com/",
1183-
wallet_live_date: "January 19 2022",
1184-
active_development_team: true,
1185-
languages_supported: ["en"],
1186-
twitter: "https://twitter.com/Opera_Crypto",
1187-
discord: "https://discord.gg/operacrypto",
1188-
reddit: "",
1189-
telegram: "",
1190-
ios: true,
1191-
android: true,
1192-
linux: true,
1193-
windows: true,
1194-
macOS: true,
1195-
firefox: false,
1196-
chromium: false,
1197-
hardware: false,
1198-
open_source: false,
1199-
repo_url: "",
1200-
non_custodial: true,
1201-
security_audit: [""],
1202-
scam_protection: true,
1203-
hardware_support: false,
1204-
walletconnect: false,
1205-
rpc_importing: false,
1206-
nft_support: true,
1207-
connect_to_dapps: true,
1208-
staking: false,
1209-
swaps: true,
1210-
multichain: true,
1211-
layer_2: false,
1212-
gas_fee_customization: false,
1213-
ens_support: true,
1214-
erc_20_support: true,
1215-
eip_1559_support: false,
1216-
buy_crypto: true,
1217-
withdraw_crypto: true,
1218-
multisig: false,
1219-
social_recovery: false,
1220-
onboard_documentation: "",
1221-
documentation: "",
1222-
},
12231082
{
12241083
last_updated: "June 24, 2022",
12251084
name: "Guarda",
@@ -1462,100 +1321,6 @@ const walletData: WalletData[] = [
14621321
onboard_documentation: "https://learn.rainbow.me/",
14631322
documentation: "",
14641323
},
1465-
{
1466-
last_updated: "June 30, 2022",
1467-
name: "Aktionariat",
1468-
image: AktionariatImage,
1469-
brand_color: "#ffffff",
1470-
url: "https://www.aktionariat.com/",
1471-
wallet_live_date: "28.01.2021",
1472-
active_development_team: true,
1473-
languages_supported: ["en"],
1474-
twitter: "https://twitter.com/aktionariat",
1475-
discord: "",
1476-
reddit: "",
1477-
telegram: "https://t.me/Aktionariat",
1478-
ios: true,
1479-
android: true,
1480-
linux: false,
1481-
windows: false,
1482-
macOS: false,
1483-
firefox: false,
1484-
chromium: false,
1485-
hardware: false,
1486-
open_source: false,
1487-
repo_url: "",
1488-
non_custodial: true,
1489-
security_audit: [""],
1490-
scam_protection: false,
1491-
hardware_support: false,
1492-
walletconnect: true,
1493-
rpc_importing: false,
1494-
nft_support: false,
1495-
connect_to_dapps: true,
1496-
staking: false,
1497-
swaps: false,
1498-
multichain: false,
1499-
layer_2: true,
1500-
gas_fee_customization: true,
1501-
ens_support: false,
1502-
erc_20_support: false,
1503-
eip_1559_support: true,
1504-
buy_crypto: true,
1505-
withdraw_crypto: false,
1506-
multisig: false,
1507-
social_recovery: false,
1508-
onboard_documentation: "",
1509-
documentation: "https://www.aktionariat.com/faq/en#wallet",
1510-
},
1511-
{
1512-
last_updated: "2022-08-21",
1513-
name: "Sequence",
1514-
image: SequenceImage,
1515-
brand_color: "#000000",
1516-
url: "https://www.sequence.xyz",
1517-
wallet_live_date: "2021-11-04",
1518-
active_development_team: true,
1519-
languages_supported: ["en"],
1520-
twitter: "https://twitter.com/0xsequence",
1521-
discord: "https://discord.gg/sequence",
1522-
reddit: "https://www.reddit.com/r/0xSequence/",
1523-
telegram: "",
1524-
ios: false,
1525-
android: false,
1526-
linux: false,
1527-
windows: false,
1528-
macOS: false,
1529-
firefox: true,
1530-
chromium: true,
1531-
hardware: false,
1532-
open_source: true,
1533-
repo_url: "https://github.com/0xsequence/wallet-contracts",
1534-
non_custodial: true,
1535-
security_audit: [
1536-
"https://docs.sequence.build/wallet-contracts/contract-audits",
1537-
],
1538-
scam_protection: true,
1539-
hardware_support: false,
1540-
walletconnect: true,
1541-
rpc_importing: false,
1542-
nft_support: true,
1543-
connect_to_dapps: true,
1544-
staking: false,
1545-
swaps: true,
1546-
multichain: true,
1547-
layer_2: false,
1548-
gas_fee_customization: false,
1549-
ens_support: true,
1550-
erc_20_support: true,
1551-
eip_1559_support: true,
1552-
buy_crypto: false,
1553-
withdraw_crypto: false,
1554-
multisig: true,
1555-
social_recovery: false,
1556-
onboard_documentation: "https://support.sequence.xyz/",
1557-
documentation: "https://docs.sequence.xyz/",
1558-
},
15591324
{
15601325
last_updated: "2022-08-21",
15611326
name: "Trezor",

src/lib/utils/url.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import path from "path"
1+
import { join } from "path"
22

3-
import { DISCORD_PATH, MAIN_CONTENT_ID } from "@/lib/constants"
3+
import {
4+
DEFAULT_LOCALE,
5+
DISCORD_PATH,
6+
MAIN_CONTENT_ID,
7+
SITE_URL,
8+
} from "@/lib/constants"
49

510
export const isDiscordInvite = (href: string): boolean =>
611
href.includes(DISCORD_PATH) && !href.includes("http")
@@ -36,5 +41,8 @@ export const cleanPath = (path: string): string => path.replace(/[$#].+$/, "")
3641

3742
export const addSlashes = (href: string): string => {
3843
if (isExternal(href)) return href
39-
return path.join("/", href, "/")
44+
return join("/", href, "/")
4045
}
46+
47+
export const getFullUrl = (locale: string | undefined, path: string) =>
48+
addSlashes(new URL(join(locale || DEFAULT_LOCALE, path), SITE_URL).href)

0 commit comments

Comments
 (0)