Skip to content

Commit 42ab0e8

Browse files
authored
Merge branch 'dev' into cleanPublicFolder
2 parents 7c16f3c + 4560e3a commit 42ab0e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+268
-128
lines changed

.github/ISSUE_TEMPLATE/suggest_dapp.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ body:
2424
description: Please provide the official name of the dapp
2525
validations:
2626
required: true
27+
- type: input
28+
id: dapp_url
29+
attributes:
30+
label: Dapp URL
31+
description: Please provide a URL to the dapp
32+
validations:
33+
required: true
2734
- type: textarea
2835
id: dapp_description
2936
attributes:

public/content/developers/docs/accounts/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ There is also another type of key in Ethereum, introduced when Ethereum switched
109109

110110
## A note on wallets {#a-note-on-wallets}
111111

112-
An account is not a wallet. An account is the keypair for a user-owned Ethereum account. A wallet is an interface or application that lets you interact with your Ethereum account.
112+
An account is not a wallet. A wallet is an interface or application that lets you interact with your Ethereum account, either an externally-owned account or a contract account.
113113

114114
## A visual demo {#a-visual-demo}
115115

src/components/FileContributors.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useState } from "react"
2-
import { useRouter } from "next/router"
32
import {
43
Avatar,
54
Flex,
@@ -9,7 +8,7 @@ import {
98
VStack,
109
} from "@chakra-ui/react"
1110

12-
import type { ChildOnlyProp, FileContributor, Lang } from "@/lib/types"
11+
import type { ChildOnlyProp, FileContributor } from "@/lib/types"
1312

1413
import { Button } from "@/components/Buttons"
1514
import InlineLink from "@/components/Link"
@@ -18,7 +17,6 @@ import Text from "@/components/OldText"
1817
import Translation from "@/components/Translation"
1918

2019
import { trackCustomEvent } from "@/lib/utils/matomo"
21-
import { getLocaleTimestamp } from "@/lib/utils/time"
2220

2321
const ContributorList = ({ children }: Required<ChildOnlyProp>) => (
2422
<UnorderedList maxH="2xs" m={0} mt={6} overflowY="scroll">
@@ -44,16 +42,15 @@ const Contributor = ({ contributor }: ContributorProps) => (
4442

4543
export type FileContributorsProps = FlexProps & {
4644
contributors: FileContributor[]
47-
lastEdit: string
45+
lastEditLocaleTimestamp: string
4846
}
4947

5048
const FileContributors = ({
5149
contributors,
52-
lastEdit,
50+
lastEditLocaleTimestamp,
5351
...props
5452
}: FileContributorsProps) => {
5553
const [isModalOpen, setModalOpen] = useState(false)
56-
const { locale } = useRouter()
5754

5855
const lastContributor: FileContributor = contributors.length
5956
? contributors[0]
@@ -102,7 +99,7 @@ const FileContributors = ({
10299
<InlineLink href={"https://github.com/" + lastContributor.login}>
103100
@{lastContributor.login}
104101
</InlineLink>
105-
, {getLocaleTimestamp(locale as Lang, lastEdit)}
102+
, {lastEditLocaleTimestamp}
106103
</Text>
107104
</Flex>
108105

src/components/Footer.tsx

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useRouter } from "next/router"
21
import { useTranslation } from "next-i18next"
32
import { FaDiscord, FaGithub, FaTwitter } from "react-icons/fa"
43
import { IoChevronUpSharp } from "react-icons/io5"
@@ -13,13 +12,12 @@ import {
1312
Text,
1413
} from "@chakra-ui/react"
1514

16-
import type { FooterLink, FooterLinkSection, Lang } from "@/lib/types"
15+
import type { FooterLink, FooterLinkSection } from "@/lib/types"
1716

1817
import { BaseLink } from "@/components/Link"
1918
import Translation from "@/components/Translation"
2019

2120
import { scrollIntoView } from "@/lib/utils/scrollIntoView"
22-
import { getLocaleTimestamp } from "@/lib/utils/time"
2321

2422
import { Button } from "./Buttons"
2523

@@ -42,11 +40,10 @@ const socialLinks = [
4240
]
4341

4442
type FooterProps = {
45-
lastDeployDate: string
43+
lastDeployLocaleTimestamp: string
4644
}
4745

48-
const Footer = ({ lastDeployDate }: FooterProps) => {
49-
const { locale } = useRouter()
46+
const Footer = ({ lastDeployLocaleTimestamp }: FooterProps) => {
5047
const { t } = useTranslation("common")
5148

5249
const linkSections: FooterLinkSection[] = [
@@ -319,6 +316,7 @@ const Footer = ({ lastDeployDate }: FooterProps) => {
319316
fill: "primary.base",
320317
},
321318
}
319+
322320
const linkProps = {
323321
isPartiallyActive: false,
324322
textDecor: "none",
@@ -335,7 +333,7 @@ const Footer = ({ lastDeployDate }: FooterProps) => {
335333
return (
336334
<Box as="footer" py="4" px="8">
337335
<Flex
338-
justify={{ base: "center", md: 'space-between'}}
336+
justify={{ base: "center", md: "space-between" }}
339337
alignItems="center"
340338
flexWrap="wrap"
341339
gap={8}
@@ -344,12 +342,9 @@ const Footer = ({ lastDeployDate }: FooterProps) => {
344342
borderTop={"1px solid"}
345343
borderColor={"body.light"}
346344
>
347-
{lastDeployDate && (
348-
<Text fontSize={"sm"} fontStyle={"italic"} color={"body.medium"}>
349-
<Translation id="website-last-updated" />:{" "}
350-
{getLocaleTimestamp(locale as Lang, lastDeployDate)}
351-
</Text>
352-
)}
345+
<Text fontSize={"sm"} fontStyle={"italic"} color={"body.medium"}>
346+
<Translation id="website-last-updated" />: {lastDeployLocaleTimestamp}
347+
</Text>
353348

354349
<Button
355350
leftIcon={<IoChevronUpSharp />}
@@ -428,11 +423,7 @@ const Footer = ({ lastDeployDate }: FooterProps) => {
428423
m={0}
429424
>
430425
{dipperLinks.map(({ to, text }) => (
431-
<ListItem
432-
key={text}
433-
textAlign="center"
434-
px="2"
435-
>
426+
<ListItem key={text} textAlign="center" px="2">
436427
<BaseLink href={to} w={["100%", null]} {...linkProps}>
437428
{text}
438429
</BaseLink>

src/layouts/Docs.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ type DocsLayoutProps = Pick<
197197
MdPageContent,
198198
| "slug"
199199
| "tocItems"
200-
| "lastUpdatedDate"
200+
| "lastEditLocaleTimestamp"
201201
| "contributors"
202202
| "contentNotTranslated"
203203
> &
204-
Required<Pick<MdPageContent, "lastUpdatedDate">> &
204+
Required<Pick<MdPageContent, "lastEditLocaleTimestamp">> &
205205
ChildOnlyProp & {
206206
frontmatter: DocsFrontmatter
207207
}
@@ -211,7 +211,7 @@ export const DocsLayout = ({
211211
frontmatter,
212212
slug,
213213
tocItems,
214-
lastUpdatedDate,
214+
lastEditLocaleTimestamp,
215215
contributors,
216216
contentNotTranslated,
217217
}: DocsLayoutProps) => {
@@ -233,7 +233,7 @@ export const DocsLayout = ({
233233
<H1 id="top">{frontmatter.title}</H1>
234234
<FileContributors
235235
contributors={contributors}
236-
lastEdit={lastUpdatedDate}
236+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
237237
/>
238238
<TableOfContents
239239
slug={slug}

src/layouts/Roadmap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
WrapItem,
1010
} from "@chakra-ui/react"
1111

12-
import type { ChildOnlyProp, TranslationKey } from "@/lib/types"
12+
import type { ChildOnlyProp } from "@/lib/types"
1313
import type { MdPageContent, RoadmapFrontmatter } from "@/lib/interfaces"
1414

1515
import Breadcrumbs from "@/components/Breadcrumbs"

src/layouts/RootLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const RootLayout = ({
2424
children,
2525
// contentIsOutdated,
2626
// contentNotTranslated,
27-
lastDeployDate,
27+
lastDeployLocaleTimestamp,
2828
}: Root) => {
2929
// const { locale, asPath } = useRouter()
3030

@@ -68,7 +68,7 @@ export const RootLayout = ({
6868

6969
{children}
7070

71-
<Footer lastDeployDate={lastDeployDate} />
71+
<Footer lastDeployLocaleTimestamp={lastDeployLocaleTimestamp} />
7272
<FeedbackWidget />
7373
</Container>
7474
)

src/layouts/Static.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import TranslationChartImage from "@/components/TranslationChartImage"
3333
import UpcomingEventsList from "@/components/UpcomingEventsList"
3434

3535
import { getEditPath } from "@/lib/utils/editPath"
36-
import { getLocaleTimestamp } from "@/lib/utils/time"
3736
import { isLangRightToLeft } from "@/lib/utils/translations"
3837

3938
import GuideHeroImage from "@/public/images/heroes/guides-hub-hero.jpg"
@@ -76,7 +75,7 @@ export const staticComponents = {
7675
type StaticLayoutProps = ChildOnlyProp &
7776
Pick<
7877
MdPageContent,
79-
"slug" | "tocItems" | "lastUpdatedDate" | "contentNotTranslated"
78+
"slug" | "tocItems" | "lastEditLocaleTimestamp" | "contentNotTranslated"
8079
> & {
8180
frontmatter: StaticFrontmatter
8281
}
@@ -85,7 +84,7 @@ export const StaticLayout = ({
8584
frontmatter,
8685
slug,
8786
tocItems,
88-
lastUpdatedDate,
87+
lastEditLocaleTimestamp,
8988
contentNotTranslated,
9089
}: StaticLayoutProps) => {
9190
const { locale, asPath } = useRouter()
@@ -115,15 +114,14 @@ export const StaticLayout = ({
115114
) : (
116115
<>
117116
<Breadcrumbs slug={slug} mb="8" />
118-
{lastUpdatedDate && (
119-
<Text
120-
color="text200"
121-
dir={isLangRightToLeft(locale as Lang) ? "rtl" : "ltr"}
122-
>
123-
<Translation id="page-last-updated" />:{" "}
124-
{getLocaleTimestamp(locale as Lang, lastUpdatedDate)}
125-
</Text>
126-
)}
117+
118+
<Text
119+
color="text200"
120+
dir={isLangRightToLeft(locale as Lang) ? "rtl" : "ltr"}
121+
>
122+
<Translation id="page-last-updated" />:{" "}
123+
{lastEditLocaleTimestamp}
124+
</Text>
127125
</>
128126
)}
129127

src/layouts/Tutorial.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const tutorialsComponents = {
155155
}
156156
type TutorialLayoutProps = ChildOnlyProp &
157157
Pick<MdPageContent, "tocItems" | "contributors" | "contentNotTranslated"> &
158-
Required<Pick<MdPageContent, "lastUpdatedDate">> & {
158+
Required<Pick<MdPageContent, "lastEditLocaleTimestamp">> & {
159159
frontmatter: TutorialFrontmatter
160160
timeToRead: number
161161
}
@@ -165,7 +165,7 @@ export const TutorialLayout = ({
165165
frontmatter,
166166
tocItems,
167167
timeToRead,
168-
lastUpdatedDate,
168+
lastEditLocaleTimestamp,
169169
contributors,
170170
contentNotTranslated,
171171
}: TutorialLayoutProps) => {
@@ -196,7 +196,7 @@ export const TutorialLayout = ({
196196
{children}
197197
<FileContributors
198198
contributors={contributors}
199-
lastEdit={lastUpdatedDate}
199+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
200200
/>
201201
<FeedbackCard />
202202
</ContentContainer>

src/layouts/Upgrade.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useRouter } from "next/router"
21
import { useTranslation } from "next-i18next"
32
import {
43
Box,
@@ -10,7 +9,7 @@ import {
109
useToken,
1110
} from "@chakra-ui/react"
1211

13-
import type { ChildOnlyProp, Lang } from "@/lib/types"
12+
import type { ChildOnlyProp } from "@/lib/types"
1413
import type { MdPageContent, UpgradeFrontmatter } from "@/lib/interfaces"
1514

1615
import BeaconChainActions from "@/components/BeaconChainActions"
@@ -29,7 +28,6 @@ import MergeInfographic from "@/components/MergeInfographic"
2928
import UpgradeStatus from "@/components/UpgradeStatus"
3029

3130
import { getSummaryPoints } from "@/lib/utils/getSummaryPoints"
32-
import { getLocaleTimestamp } from "@/lib/utils/time"
3331

3432
const Page = (props: FlexProps) => <MdPage sx={{}} {...props} />
3533

@@ -62,7 +60,7 @@ export const upgradeComponents = {
6260
type UpgradeLayoutProps = ChildOnlyProp &
6361
Pick<
6462
MdPageContent,
65-
"slug" | "tocItems" | "lastUpdatedDate" | "contentNotTranslated"
63+
"slug" | "tocItems" | "lastEditLocaleTimestamp" | "contentNotTranslated"
6664
> & {
6765
frontmatter: UpgradeFrontmatter
6866
}
@@ -71,11 +69,10 @@ export const UpgradeLayout = ({
7169
frontmatter,
7270
slug,
7371
tocItems,
74-
lastUpdatedDate,
72+
lastEditLocaleTimestamp,
7573
contentNotTranslated,
7674
}: UpgradeLayoutProps) => {
7775
const { t } = useTranslation("page-upgrades")
78-
const { locale } = useRouter()
7976

8077
const summaryPoints = getSummaryPoints(frontmatter)
8178

@@ -120,12 +117,10 @@ export const UpgradeLayout = ({
120117
))}
121118
</List>
122119
</Box>
123-
{lastUpdatedDate && (
124-
<LastUpdated>
125-
{t("common:page-last-updated")}:{" "}
126-
{getLocaleTimestamp(locale as Lang, lastUpdatedDate)}
127-
</LastUpdated>
128-
)}
120+
121+
<LastUpdated>
122+
{t("common:page-last-updated")}: {lastEditLocaleTimestamp}
123+
</LastUpdated>
129124
</>
130125
}
131126
heroImg={frontmatter.image}

0 commit comments

Comments
 (0)