Skip to content

Commit d63dad9

Browse files
authored
Merge pull request #2458 from reduxjs/docs/ds2-21-updates
2 parents b3d4d89 + b959613 commit d63dad9

File tree

9 files changed

+1963
-1930
lines changed

9 files changed

+1963
-1930
lines changed

docs/tutorials/rtk-query.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ With RTK Query, you usually define your entire API definition in one place. This
8080

8181
:::tip
8282

83-
Typically, you should only have one API slice per base URL that your application needs to communicate with. For example, if your site fetches data from both `/api/posts` and `/api/users`, you would have a single API slice with `/api/` as the base URL, and separate endpoint definitions for `posts` and `users`. This allows you to effectively take advantage of [automated re-fetching](./rtk-query/usage/automated-refetching.mdx) by defining [tag](./rtk-query/usage/automated-refetching.mdx#tags) relationships across endpoints.
83+
Typically, you should only have one API slice per base URL that your application needs to communicate with. For example, if your site fetches data from both `/api/posts` and `/api/users`, you would have a single API slice with `/api/` as the base URL, and separate endpoint definitions for `posts` and `users`. This allows you to effectively take advantage of [automated re-fetching](../rtk-query/usage/automated-refetching.mdx) by defining [tag](../rtk-query/usage/automated-refetching.mdx#tags) relationships across endpoints.
8484

85-
For maintainability purposes, you may wish to split up endpoint definitions across multiple files, while still maintaining a single API slice which includes all of these endpoints. See [code splitting](./rtk-query/usage/code-splitting.mdx) for how you can use the `injectEndpoints` property to inject API endpoints from other files into a single API slice definition.
85+
For maintainability purposes, you may wish to split up endpoint definitions across multiple files, while still maintaining a single API slice which includes all of these endpoints. See [code splitting](../rtk-query/usage/code-splitting.mdx) for how you can use the `injectEndpoints` property to inject API endpoints from other files into a single API slice definition.
8686

8787
:::
8888

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ignore = "git diff --quiet HEAD^ HEAD docs website"
66

77
[build.environment]
8-
NODE_VERSION = "14"
8+
NODE_VERSION = "16"
99
NODE_OPTIONS = "--max_old_space_size=4096"
1010
NETLIFY_USE_YARN = "true"
1111
YARN_VERSION = "1.22.10"

website/docusaurus.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module.exports = {
1111
'@docusaurus/preset-classic',
1212
{
1313
docs: {
14-
docLayoutComponent: '../src/theme/DocPageWithBraveWarning',
1514
path: '../docs',
1615
sidebarPath: require.resolve('./sidebars.json'),
1716
showLastUpdateTime: true,
@@ -50,6 +49,9 @@ module.exports = {
5049
theme: {
5150
customCss: require.resolve('./src/css/custom.css'),
5251
},
52+
googleAnalytics: {
53+
trackingID: 'UA-130598673-3',
54+
},
5355
},
5456
],
5557
],
@@ -64,7 +66,7 @@ module.exports = {
6466
repoUrl: 'https://github.com/reduxjs/redux-toolkit',
6567
},
6668
themeConfig: {
67-
metadatas: [{ name: 'twitter:card', content: 'summary' }],
69+
metadata: [{ name: 'twitter:card', content: 'summary' }],
6870
prism: {
6971
theme: require('./src/js/monokaiTheme.js'),
7072
},
@@ -160,12 +162,10 @@ module.exports = {
160162
copyright: `Copyright © 2015–${new Date().getFullYear()} Dan Abramov and the Redux documentation authors.`,
161163
},
162164
algolia: {
163-
apiKey: '82d838443b672336bf63cab4772d9eb4',
165+
appId: 'CK59DFV0FC',
166+
apiKey: '98e886dfbcde7f7e8ec8d7ff1c2c34c8',
164167
indexName: 'redux-starter-kit',
165-
searchParameters: {},
166-
},
167-
googleAnalytics: {
168-
trackingID: 'UA-130598673-3',
168+
algoliaOptions: {},
169169
},
170170
},
171171
}

website/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"deploy": "docusaurus deploy"
1010
},
1111
"dependencies": {
12-
"@docusaurus/core": "2.0.0-beta.7",
13-
"@docusaurus/preset-classic": "2.0.0-beta.7",
12+
"@docusaurus/core": "2.0.0-beta.21",
13+
"@docusaurus/preset-classic": "2.0.0-beta.21",
1414
"classnames": "^2.2.6",
1515
"react": "^17.0.2",
1616
"react-dom": "^17.0.2",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { ComponentProps } from 'react'
2+
import React from 'react'
3+
import Main from '@theme-original/DocPage/Layout/Main'
4+
import type MainType from '@theme-original/DocPage/Layout/Main'
5+
import BraveWarning from './BraveWarning'
6+
7+
type Props = ComponentProps<typeof MainType>
8+
9+
export default function MainWrapper(props: Props): JSX.Element {
10+
return (
11+
<>
12+
<Main {...props}>
13+
<BraveWarning />
14+
{props.children}
15+
</Main>
16+
</>
17+
)
18+
}

website/src/theme/DocPageWithBraveWarning/index.js

Lines changed: 0 additions & 155 deletions
This file was deleted.

website/src/theme/DocPageWithBraveWarning/styles.module.css

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)