-
Notifications
You must be signed in to change notification settings - Fork 5
Docs/bootstrap docusaurus #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAdds a complete Docusaurus documentation site and CI/CD: site config, docs content, UI components, styles, pnpm workspace entry, and a GitHub Actions workflow that builds and deploys the site to GitHub Pages. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer (push)
participant GH as GitHub
participant Runner as Actions Runner
participant Build as Build Job (Node+pnpm)
participant Art as Artifact Store
participant Deploy as Deploy Job (actions/deploy-pages)
participant Pages as GitHub Pages
Dev->>GH: push to main/dev
GH->>Runner: trigger workflow
Runner->>Build: start build job
Build->>Build: checkout + setup Node 20
Build->>Build: pnpm install (./docs) & pnpm build
Build->>Art: upload docs/build artifact
Runner->>Deploy: start deploy job (depends on build)
Deploy->>Art: download artifact
Deploy->>Deploy: actions/deploy-pages@v4 deploy
Deploy->>Pages: publish site
Pages-->>GH: site updated
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🤖 Fix all issues with AI agents
In @.github/workflows/docusaurus.yml:
- Around line 39-57: The deploy job named "deploy" is running for pull_request
events where actions/deploy-pages@v4 fails; add a job-level conditional to run
only on push events by adding an if: github.event_name == 'push' to the deploy
job (the job with id 'deployment' that uses actions/deploy-pages@v4) so the step
is skipped for PR workflows.
- Around line 16-37: Remove the invalid working-directory keys from the uses
steps (actions/checkout@v4 and actions/setup-node@v4 and the upload action
step), leaving working-directory only on run steps (the "Install dependencies"
and "Build website" steps); keep actions/checkout@v4 and actions/setup-node@v4
as plain uses steps, and for the "Upload Build Artifact" step update the
artifact path to point to the subdirectory (set with.path to ./app/build)
instead of relying on working-directory.
In `@docs/docs/W3DS` Basics/getting-started.md:
- Line 45: The sentence uses a bare URL which violates markdownlint MD034;
update the line in getting-started.md (the sentence containing
http://localhost:3000/) to wrap the URL in angle brackets like
<http://localhost:3000/> or convert it to a Markdown link (e.g.,
[http://localhost:3000/](http://localhost:3000/)) so the URL is not bare in the
Markdown source.
In `@docs/docusaurus.config.ts`:
- Around line 60-78: Update the navbar config to replace template placeholders:
change navbar.title from "My Site" to "W3DS Documentation", update
navbar.logo.alt to a project-specific string (e.g., "W3DS Logo"), and replace
the items[href] value that points to "https://github.com/facebook/docusaurus"
with the project’s GitHub URL; locate these fields under the navbar object
(title, logo.alt, and the items array entry with href) and update their values
accordingly.
- Around line 47-48: The editUrl in the Docusaurus site config is pointing to
the upstream template repo; update the editUrl property in
docs/docusaurus.config.ts (the editUrl field) to the correct URL for this
repository's docs source (e.g., the GitHub tree/path for the repo and docs
directory) so the "Edit this page" links point to this project's repo instead of
facebook/docusaurus.
- Around line 86-93: Update the footer link and copyright text in
docusaurus.config.ts: change the 'to' value for the footer item with label
'Tutorial' from '/docs/intro' to the actual doc path '/docs/getting-started' (or
the correct route that maps to getting-started.md) so the link resolves, and fix
the copyright string that contains "MetasState" to "MetaState" in the same
config constant.
In `@docs/README.md`:
- Around line 7-39: Update the README to align package manager commands with the
repository's pnpm workspace: replace or augment every occurrence of the yarn
commands (yarn, yarn start, yarn build, yarn deploy, USE_SSH=true yarn deploy,
GIT_USER=... yarn deploy) with their pnpm equivalents (or add a short note
stating that yarn is also supported), and add a brief note about running package
scripts from the docs package in a pnpm workspace (e.g., using pnpm --filter or
workspace run conventions) so contributors know which command to use in this
repo.
In `@docs/src/pages/index.tsx`:
- Line 1: Remove the unused useEffect import and the empty effect call: edit the
import statement to drop useEffect (keep ReactNode if used elsewhere) and remove
the no-op useEffect hook invocation (search for useEffect(...) in this file).
Ensure the component references (e.g., ReactNode) remain unchanged and no other
logic depends on the removed hook.
- Around line 11-34: Delete the empty useEffect call inside the HomepageHeader
component (remove the lines containing useEffect(() => { }, []) ) since it
serves no purpose; after removing it, also remove the unused useEffect import
from React (or adjust the import statement in the file) to avoid unused-import
warnings.
🧹 Nitpick comments (8)
docs/docs/W3DS Protocol/_category_.json (1)
1-7: Directory name contains a space.The directory
W3DS Protocolcontains a space, which will result in URL-encoded paths (e.g.,/W3DS%20Protocol/). Consider using kebab-case (w3ds-protocol) for cleaner URLs and avoiding potential path issues.If you prefer to keep the directory name as-is for display purposes, you can use the
slugproperty in the category configuration to customize the URL path while retaining the readable label.docs/src/pages/markdown-page.md (1)
1-7: Remove or customize boilerplate example page.This appears to be a scaffold placeholder from
create-docusaurus. Consider removing this file before merging, or replacing it with actual project content to avoid publishing template pages to the documentation site.docs/docs/Getting Started/_category_.json (1)
1-7: Same directory naming consideration applies.Similar to the W3DS Protocol category, consider using kebab-case (
getting-started) for the directory name to produce cleaner URLs. Configuration structure is correct otherwise.docs/.gitignore (1)
18-20: Consider adding pnpm debug log pattern.Since this project uses pnpm (per
pnpm-workspace.yaml), consider addingpnpm-debug.log*for consistency with the other package manager debug logs.Suggested addition
npm-debug.log* yarn-debug.log* yarn-error.log* +pnpm-debug.log*docs/docs/Getting Started/getting-started.md (1)
1-47: Boilerplate content should be customized for W3DS documentation.This page contains the default Docusaurus tutorial content rather than project-specific documentation. Since this is the "Getting Started" section for W3DS Documentation, consider replacing this with actual W3DS getting started content.
Additionally, Line 47 references
docs/intro.mdwhich doesn't match the actual file structure (getting-started.md).docs/docs/W3DS Protocol/getting-started.md (1)
1-47: Duplicate boilerplate content - needs protocol-specific documentation.This file is identical to
docs/docs/Getting Started/getting-started.md. The W3DS Protocol section should contain protocol-specific documentation rather than duplicated generic Docusaurus tutorial content.Consider either:
- Adding actual W3DS Protocol documentation
- Removing this placeholder until real content is ready
docs/src/pages/index.tsx (1)
25-29: Update link destination and button text for W3DS.The button links to
/docs/introwhich may not exist in the current structure, and the text references "Docusaurus Tutorial" rather than W3DS documentation.Suggested fix
<Link className="button button--secondary button--lg" - to="/docs/intro"> - Docusaurus Tutorial - 5min ⏱️ + to="/docs/Getting Started/getting-started"> + Get Started with W3DS ⏱️ </Link>docs/src/components/HomepageFeatures/index.tsx (1)
12-43: Update feature content to reflect W3DS documentation.The feature list contains generic Docusaurus boilerplate. These should be updated to reflect W3DS-specific features and value propositions (e.g., "Easy to Use" and "Powered by React" currently describe Docusaurus, not W3DS).
|
|
||
| The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. | ||
|
|
||
| The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid bare URL to satisfy markdownlint (MD034).
Wrap the URL in angle brackets or a Markdown link.
✏️ Suggested fix
-The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
+The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at <http://localhost:3000/>.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. | |
| The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at <http://localhost:3000/>. |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
45-45: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
In `@docs/docs/W3DS` Basics/getting-started.md at line 45, The sentence uses a
bare URL which violates markdownlint MD034; update the line in
getting-started.md (the sentence containing http://localhost:3000/) to wrap the
URL in angle brackets like <http://localhost:3000/> or convert it to a Markdown
link (e.g., [http://localhost:3000/](http://localhost:3000/)) so the URL is not
bare in the Markdown source.
| editUrl: | ||
| 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update editUrl to point to this repository.
The editUrl currently points to Facebook's Docusaurus template repository. This should be updated to enable proper "Edit this page" functionality.
Suggested fix
editUrl:
- 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
+ 'https://github.com/MetaState-Prototype-Project/prototype/tree/main/docs/',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| editUrl: | |
| 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', | |
| editUrl: | |
| 'https://github.com/MetaState-Prototype-Project/prototype/tree/main/docs/', |
🤖 Prompt for AI Agents
In `@docs/docusaurus.config.ts` around lines 47 - 48, The editUrl in the
Docusaurus site config is pointing to the upstream template repo; update the
editUrl property in docs/docusaurus.config.ts (the editUrl field) to the correct
URL for this repository's docs source (e.g., the GitHub tree/path for the repo
and docs directory) so the "Edit this page" links point to this project's repo
instead of facebook/docusaurus.
| navbar: { | ||
| title: 'My Site', | ||
| logo: { | ||
| alt: 'My Site Logo', | ||
| src: 'img/logo.svg', | ||
| }, | ||
| items: [ | ||
| { | ||
| type: 'docSidebar', | ||
| sidebarId: 'tutorialSidebar', | ||
| position: 'left', | ||
| label: 'Tutorial', | ||
| }, | ||
| { | ||
| href: 'https://github.com/facebook/docusaurus', | ||
| label: 'GitHub', | ||
| position: 'right', | ||
| }, | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update placeholder values in navbar configuration.
Several navbar values are still using Docusaurus template defaults:
- Line 61: Title is "My Site" instead of "W3DS Documentation"
- Line 63: Logo alt text should be project-specific
- Line 74: GitHub link points to
facebook/docusaurusinstead of this project
Suggested fix
navbar: {
- title: 'My Site',
+ title: 'W3DS Documentation',
logo: {
- alt: 'My Site Logo',
+ alt: 'W3DS Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{
- href: 'https://github.com/facebook/docusaurus',
+ href: 'https://github.com/MetaState-Prototype-Project/prototype',
label: 'GitHub',
position: 'right',
},
],
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| navbar: { | |
| title: 'My Site', | |
| logo: { | |
| alt: 'My Site Logo', | |
| src: 'img/logo.svg', | |
| }, | |
| items: [ | |
| { | |
| type: 'docSidebar', | |
| sidebarId: 'tutorialSidebar', | |
| position: 'left', | |
| label: 'Tutorial', | |
| }, | |
| { | |
| href: 'https://github.com/facebook/docusaurus', | |
| label: 'GitHub', | |
| position: 'right', | |
| }, | |
| ], | |
| navbar: { | |
| title: 'W3DS Documentation', | |
| logo: { | |
| alt: 'W3DS Logo', | |
| src: 'img/logo.svg', | |
| }, | |
| items: [ | |
| { | |
| type: 'docSidebar', | |
| sidebarId: 'tutorialSidebar', | |
| position: 'left', | |
| label: 'Tutorial', | |
| }, | |
| { | |
| href: 'https://github.com/MetaState-Prototype-Project/prototype', | |
| label: 'GitHub', | |
| position: 'right', | |
| }, | |
| ], |
🤖 Prompt for AI Agents
In `@docs/docusaurus.config.ts` around lines 60 - 78, Update the navbar config to
replace template placeholders: change navbar.title from "My Site" to "W3DS
Documentation", update navbar.logo.alt to a project-specific string (e.g., "W3DS
Logo"), and replace the items[href] value that points to
"https://github.com/facebook/docusaurus" with the project’s GitHub URL; locate
these fields under the navbar object (title, logo.alt, and the items array entry
with href) and update their values accordingly.
| { | ||
| label: 'Tutorial', | ||
| to: '/docs/intro', | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| copyright: `Copyright © ${new Date().getFullYear()} Stichting MetasState Foundation. Built with Docusaurus.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix footer link and typo in copyright.
- Line 88: The footer link
/docs/intromay not resolve correctly given the actual doc structure usesgetting-started.md - Line 93: Typo "MetasState" should be "MetaState"
Suggested fix
{
label: 'Tutorial',
- to: '/docs/intro',
+ to: '/docs/Getting Started/getting-started',
},
],
},
],
- copyright: `Copyright © ${new Date().getFullYear()} Stichting MetasState Foundation. Built with Docusaurus.`,
+ copyright: `Copyright © ${new Date().getFullYear()} Stichting MetaState Foundation. Built with Docusaurus.`,
},🤖 Prompt for AI Agents
In `@docs/docusaurus.config.ts` around lines 86 - 93, Update the footer link and
copyright text in docusaurus.config.ts: change the 'to' value for the footer
item with label 'Tutorial' from '/docs/intro' to the actual doc path
'/docs/getting-started' (or the correct route that maps to getting-started.md)
so the link resolves, and fix the copyright string that contains "MetasState" to
"MetaState" in the same config constant.
| ```bash | ||
| yarn | ||
| ``` | ||
|
|
||
| ## Local Development | ||
|
|
||
| ```bash | ||
| yarn start | ||
| ``` | ||
|
|
||
| This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
|
||
| ## Build | ||
|
|
||
| ```bash | ||
| yarn build | ||
| ``` | ||
|
|
||
| This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
|
||
| ## Deployment | ||
|
|
||
| Using SSH: | ||
|
|
||
| ```bash | ||
| USE_SSH=true yarn deploy | ||
| ``` | ||
|
|
||
| Not using SSH: | ||
|
|
||
| ```bash | ||
| GIT_USER=<Your GitHub username> yarn deploy | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align commands with the workspace package manager.
Since the repo is configured as a pnpm workspace, consider adding pnpm equivalents (or clarifying yarn is supported) to prevent setup confusion.
📝 Suggested clarification
## Installation
```bash
yarn+If your workspace standardizes on pnpm, use the equivalent pnpm commands.
Local Development
yarn start+If using pnpm in the workspace, run the equivalent pnpm start command for the docs package.
</details>
<details>
<summary>🤖 Prompt for AI Agents</summary>
In @docs/README.md around lines 7 - 39, Update the README to align package
manager commands with the repository's pnpm workspace: replace or augment every
occurrence of the yarn commands (yarn, yarn start, yarn build, yarn deploy,
USE_SSH=true yarn deploy, GIT_USER=... yarn deploy) with their pnpm equivalents
(or add a short note stating that yarn is also supported), and add a brief note
about running package scripts from the docs package in a pnpm workspace (e.g.,
using pnpm --filter or workspace run conventions) so contributors know which
command to use in this repo.
</details>
<!-- fingerprinting:phantom:poseidon:eagle -->
<!-- This is an auto-generated comment by CodeRabbit -->
| @@ -0,0 +1,48 @@ | |||
| import { useEffect, type ReactNode } from 'react'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Remove unused useEffect import.
The useEffect hook is imported but not meaningfully used (the effect on lines 13-14 is empty).
Suggested fix
-import { useEffect, type ReactNode } from 'react';
+import type { ReactNode } from 'react';🤖 Prompt for AI Agents
In `@docs/src/pages/index.tsx` at line 1, Remove the unused useEffect import and
the empty effect call: edit the import statement to drop useEffect (keep
ReactNode if used elsewhere) and remove the no-op useEffect hook invocation
(search for useEffect(...) in this file). Ensure the component references (e.g.,
ReactNode) remain unchanged and no other logic depends on the removed hook.
docs/src/pages/index.tsx
Outdated
| function HomepageHeader() { | ||
|
|
||
| useEffect(() => { | ||
| }, []) | ||
|
|
||
| const { siteConfig } = useDocusaurusContext(); | ||
| return ( | ||
| <header className={clsx('hero hero--primary', styles.heroBanner)}> | ||
| <div className="container"> | ||
| <Heading as="h1" className="hero__title"> | ||
| {siteConfig.title} | ||
| </Heading> | ||
| <p className="hero__subtitle">{siteConfig.tagline}</p> | ||
| <div className={styles.buttons}> | ||
| <Link | ||
| className="button button--secondary button--lg" | ||
| to="/docs/intro"> | ||
| Docusaurus Tutorial - 5min ⏱️ | ||
| </Link> | ||
| </div> | ||
| </div> | ||
| </header> | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Remove empty useEffect hook.
The useEffect on lines 13-14 has no body and serves no purpose. This appears to be leftover scaffolding code.
Suggested fix
function HomepageHeader() {
-
- useEffect(() => {
- }, [])
-
const { siteConfig } = useDocusaurusContext();
return (📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function HomepageHeader() { | |
| useEffect(() => { | |
| }, []) | |
| const { siteConfig } = useDocusaurusContext(); | |
| return ( | |
| <header className={clsx('hero hero--primary', styles.heroBanner)}> | |
| <div className="container"> | |
| <Heading as="h1" className="hero__title"> | |
| {siteConfig.title} | |
| </Heading> | |
| <p className="hero__subtitle">{siteConfig.tagline}</p> | |
| <div className={styles.buttons}> | |
| <Link | |
| className="button button--secondary button--lg" | |
| to="/docs/intro"> | |
| Docusaurus Tutorial - 5min ⏱️ | |
| </Link> | |
| </div> | |
| </div> | |
| </header> | |
| ); | |
| } | |
| function HomepageHeader() { | |
| const { siteConfig } = useDocusaurusContext(); | |
| return ( | |
| <header className={clsx('hero hero--primary', styles.heroBanner)}> | |
| <div className="container"> | |
| <Heading as="h1" className="hero__title"> | |
| {siteConfig.title} | |
| </Heading> | |
| <p className="hero__subtitle">{siteConfig.tagline}</p> | |
| <div className={styles.buttons}> | |
| <Link | |
| className="button button--secondary button--lg" | |
| to="/docs/intro"> | |
| Docusaurus Tutorial - 5min ⏱️ | |
| </Link> | |
| </div> | |
| </div> | |
| </header> | |
| ); | |
| } |
🤖 Prompt for AI Agents
In `@docs/src/pages/index.tsx` around lines 11 - 34, Delete the empty useEffect
call inside the HomepageHeader component (remove the lines containing
useEffect(() => { }, []) ) since it serves no purpose; after removing it, also
remove the unused useEffect import from React (or adjust the import statement in
the file) to avoid unused-import warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/src/pages/index.tsx`:
- Line 17: Remove the stray standalone expression "useHistory" from the file
(it's a no-op and triggers no-unused-expressions); locate the occurrence in
docs/src/pages/index.tsx (the lone useHistory token not used in any expression
or hook call) and delete it, and also remove any unused import of useHistory if
it was imported but is no longer used.
🧹 Nitpick comments (3)
.github/workflows/docusaurus.yml (1)
17-27: Usepnpm/action-setupbeforesetup-nodefor proper caching integration.The current workflow installs pnpm globally without caching or version pinning on every run. Instead, use
pnpm/action-setupbeforesetup-nodeto enable caching and ensure consistent pnpm versions. The order matters:pnpm/action-setupmust be installed first so the store path exists beforesetup-nodeattempts cache restoration.♻️ Suggested improvement
- uses: actions/checkout@v4 with: fetch-depth: 0 + - uses: pnpm/action-setup@v4 + with: + version: 10 - uses: actions/setup-node@v4 with: node-version: 20 + cache: pnpm - name: Install Dependencies working-directory: ./docs run: | - echo "installing pnpm" - npm install -g pnpm - echo "installing deps for packages" pnpm iAdjust pnpm
versionto match your project's requirements (10 is current as of 2025).docs/src/pages/index.tsx (2)
13-15: Includehistoryin the effect dependency array.Prevents stale closures and avoids hook-lint failures.
♻️ Proposed fix
- useEffect(() => { - history.push("/prototype/docs/Getting Started/getting-started") - }, []) + useEffect(() => { + history.push("/prototype/docs/Getting Started/getting-started") + }, [history])
9-15: Avoid hard-coded baseUrl + space in path; verify the actual docs route.The redirect includes a hard-coded
/prototypeand a space in the path. Docusaurus routing often depends onbaseUrland slug normalization/encoding, so this can 404 across environments. Please verify the generated URL and consideruseBaseUrl(or an encoded path) to keep it portable.♻️ Possible approach
+import useBaseUrl from '@docusaurus/useBaseUrl'; @@ - useEffect(() => { - history.push("/prototype/docs/Getting Started/getting-started") - }, [history]) + const target = useBaseUrl('/docs/Getting%20Started/getting-started'); + useEffect(() => { + history.push(target); + }, [history, target])
| history.push("/prototype/docs/Getting Started/getting-started") | ||
| }, []) | ||
|
|
||
| useHistory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the stray useHistory expression.
It’s a no-op and can trip no-unused-expressions lint.
🧹 Proposed fix
- useHistory📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| useHistory |
🤖 Prompt for AI Agents
In `@docs/src/pages/index.tsx` at line 17, Remove the stray standalone expression
"useHistory" from the file (it's a no-op and triggers no-unused-expressions);
locate the occurrence in docs/src/pages/index.tsx (the lone useHistory token not
used in any expression or hook call) and delete it, and also remove any unused
import of useHistory if it was imported but is no longer used.
Description of change
Issue Number
closes #687
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.