Skip to content

Commit a2ca494

Browse files
authored
Merge pull request #95 from reactjs/sync-c0c955ed
Sync with react.dev @ c0c955e
2 parents 359b22c + a173994 commit a2ca494

Some content is hidden

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

47 files changed

+462
-198
lines changed

.github/workflows/analyze_comment.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ on:
66
types:
77
- completed
88

9-
permissions: {}
10-
9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
1114
jobs:
1215
comment:
1316
runs-on: ubuntu-latest

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"@radix-ui/react-context-menu": "^2.1.5",
3131
"body-scroll-lock": "^3.1.3",
3232
"classnames": "^2.2.6",
33-
"date-fns": "^2.16.1",
3433
"debounce": "^1.2.1",
3534
"github-slugger": "^1.3.0",
3635
"next": "15.1.0",
75.6 KB
Binary file not shown.
64.9 KB
Binary file not shown.

src/components/Layout/HomeContent.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,8 @@ function ExampleLayout({
860860
</div>
861861
<div
862862
ref={contentRef}
863-
className="relative mt-0 lg:-my-20 w-full p-2.5 xs:p-5 lg:p-10 flex grow justify-center">
863+
className="relative mt-0 lg:-my-20 w-full p-2.5 xs:p-5 lg:p-10 flex grow justify-center"
864+
dir="ltr">
864865
{right}
865866
<div
866867
className={cn(
@@ -1172,7 +1173,7 @@ async function Talks({ confId }) {
11721173
</CodeBlock>
11731174
}
11741175
right={
1175-
<NavContext.Provider value={{slug, navigate}}>
1176+
<NavContext value={{slug, navigate}}>
11761177
<BrowserChrome
11771178
domain="example.com"
11781179
path={'confs/' + slug}
@@ -1192,7 +1193,7 @@ async function Talks({ confId }) {
11921193
</Suspense>
11931194
</ExamplePanel>
11941195
</BrowserChrome>
1195-
</NavContext.Provider>
1196+
</NavContext>
11961197
}
11971198
/>
11981199
);

src/components/Layout/Page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,9 @@ export function Page({
8282
'max-w-7xl mx-auto',
8383
section === 'blog' && 'lg:flex lg:flex-col lg:items-center'
8484
)}>
85-
<TocContext.Provider value={toc}>
86-
<LanguagesContext.Provider value={languages}>
87-
{children}
88-
</LanguagesContext.Provider>
89-
</TocContext.Provider>
85+
<TocContext value={toc}>
86+
<LanguagesContext value={languages}>{children}</LanguagesContext>
87+
</TocContext>
9088
</div>
9189
{!isBlogIndex && (
9290
<DocsPageFooter

src/components/Layout/TopNav/TopNav.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ export default function TopNav({
266266
<BrandMenu>
267267
<div className="flex items-center">
268268
<div className="uwu-visible flex items-center justify-center h-full">
269-
<NextLink href="/">
269+
<NextLink
270+
href="/"
271+
className="active:scale-95 transition-transform">
270272
<Image
271273
alt="logo by @sawaratsuki1004"
272274
title="logo by @sawaratsuki1004"

src/components/MDX/MDXComponents.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ function IllustrationBlock({
357357
</figure>
358358
));
359359
return (
360-
<IllustrationContext.Provider value={isInBlockTrue}>
360+
<IllustrationContext value={isInBlockTrue}>
361361
<div className="relative group before:absolute before:-inset-y-16 before:inset-x-0 my-16 mx-0 2xl:mx-auto max-w-4xl 2xl:max-w-6xl">
362362
{sequential ? (
363363
<ol className="mdx-illustration-block flex">
@@ -372,7 +372,7 @@ function IllustrationBlock({
372372
)}
373373
<AuthorCredit author={author} authorLink={authorLink} />
374374
</div>
375-
</IllustrationContext.Provider>
375+
</IllustrationContext>
376376
);
377377
}
378378

src/components/MDX/Sandpack/template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const template = {
22
'/src/index.js': {
33
hidden: true,
4-
code: `import React, { StrictMode } from "react";
4+
code: `import { StrictMode } from "react";
55
import { createRoot } from "react-dom/client";
66
import "./styles.css";
77

src/components/Seo.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ export const Seo = withRouter(
124124
)}
125125
<link
126126
rel="preload"
127-
href="/fonts/Source-Code-Pro-Regular.woff2"
127+
href="https://react.dev/fonts/Source-Code-Pro-Regular.woff2"
128+
as="font"
129+
type="font/woff2"
130+
crossOrigin="anonymous"
131+
/>
132+
<link
133+
rel="preload"
134+
href="https://react.dev/fonts/Source-Code-Pro-Bold.woff2"
128135
as="font"
129136
type="font/woff2"
130137
crossOrigin="anonymous"

0 commit comments

Comments
 (0)