Skip to content

Commit

Permalink
Merge pull request #2458 from reduxjs/docs/ds2-21-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Jun 29, 2022
2 parents b3d4d89 + b959613 commit d63dad9
Show file tree
Hide file tree
Showing 9 changed files with 1,963 additions and 1,930 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/rtk-query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ With RTK Query, you usually define your entire API definition in one place. This

:::tip

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.
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.

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.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ignore = "git diff --quiet HEAD^ HEAD docs website"

[build.environment]
NODE_VERSION = "14"
NODE_VERSION = "16"
NODE_OPTIONS = "--max_old_space_size=4096"
NETLIFY_USE_YARN = "true"
YARN_VERSION = "1.22.10"
Expand Down
14 changes: 7 additions & 7 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
'@docusaurus/preset-classic',
{
docs: {
docLayoutComponent: '../src/theme/DocPageWithBraveWarning',
path: '../docs',
sidebarPath: require.resolve('./sidebars.json'),
showLastUpdateTime: true,
Expand Down Expand Up @@ -50,6 +49,9 @@ module.exports = {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
googleAnalytics: {
trackingID: 'UA-130598673-3',
},
},
],
],
Expand All @@ -64,7 +66,7 @@ module.exports = {
repoUrl: 'https://github.com/reduxjs/redux-toolkit',
},
themeConfig: {
metadatas: [{ name: 'twitter:card', content: 'summary' }],
metadata: [{ name: 'twitter:card', content: 'summary' }],
prism: {
theme: require('./src/js/monokaiTheme.js'),
},
Expand Down Expand Up @@ -160,12 +162,10 @@ module.exports = {
copyright: `Copyright © 2015–${new Date().getFullYear()} Dan Abramov and the Redux documentation authors.`,
},
algolia: {
apiKey: '82d838443b672336bf63cab4772d9eb4',
appId: 'CK59DFV0FC',
apiKey: '98e886dfbcde7f7e8ec8d7ff1c2c34c8',
indexName: 'redux-starter-kit',
searchParameters: {},
},
googleAnalytics: {
trackingID: 'UA-130598673-3',
algoliaOptions: {},
},
},
}
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"deploy": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.7",
"@docusaurus/preset-classic": "2.0.0-beta.7",
"@docusaurus/core": "2.0.0-beta.21",
"@docusaurus/preset-classic": "2.0.0-beta.21",
"classnames": "^2.2.6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
18 changes: 18 additions & 0 deletions website/src/theme/DocPage/Layout/Main/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { ComponentProps } from 'react'
import React from 'react'
import Main from '@theme-original/DocPage/Layout/Main'
import type MainType from '@theme-original/DocPage/Layout/Main'
import BraveWarning from './BraveWarning'

type Props = ComponentProps<typeof MainType>

export default function MainWrapper(props: Props): JSX.Element {
return (
<>
<Main {...props}>
<BraveWarning />
{props.children}
</Main>
</>
)
}
155 changes: 0 additions & 155 deletions website/src/theme/DocPageWithBraveWarning/index.js

This file was deleted.

85 changes: 0 additions & 85 deletions website/src/theme/DocPageWithBraveWarning/styles.module.css

This file was deleted.

Loading

0 comments on commit d63dad9

Please sign in to comment.