Skip to content

Commit

Permalink
fix(website): fix docusaurus warnings (#526)
Browse files Browse the repository at this point in the history
### Describe your change

Fix docusaurus warnings on the website

### Motivation and context

Solves
[MET-307](https://metatype.atlassian.net/jira/software/c/projects/MET/boards/2?selectedIssue=MET-307)

### Migration notes

<!-- Explain HOW users should update their code when required -->

### Checklist

- [ ] The change come with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [x] End-user documentation is updated to reflect the change
  • Loading branch information
michael-0acf4 authored Dec 20, 2023
1 parent a7aac5b commit 2cb977e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions website/docs/reference/typegate/authentication/oauth2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: Elastic-2.0

import React, { useCallback, useState } from "react";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import BrowserOnly from "@docusaurus/BrowserOnly";

Expand Down Expand Up @@ -30,10 +31,10 @@ function OAuth2({ name, typegraph }) {
)}`;
return (
<p className="mb-6">
Start the flow via <a href={url}>{url}</a> and take token by clicking{" "}
<a className="cursor-pointer" onClick={take}>
Start the flow via <Link href={url}>{url}</Link> and take token by clicking{" "}
<Link className="cursor-pointer" onClick={take}>
here
</a>
</Link>
:<br />
<input
className="py-1 border-0 bg-slate-200 w-full"
Expand Down
5 changes: 3 additions & 2 deletions website/src/components/MiniQL/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { createGraphiQLFetcher } from "@graphiql/toolkit";
import BrowserOnly from "@docusaurus/BrowserOnly";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import CodeBlock from "@theme-original/CodeBlock";
import Link from "@docusaurus/Link";

import {
GraphiQLProvider,
Expand Down Expand Up @@ -101,11 +102,11 @@ function MiniQLBrowser({
{codeFileUrl ? (
<div className="p-2 text-xs font-light">
See/edit full code on{" "}
<a
<Link
href={`https://github.com/metatypedev/metatype/blob/main/${codeFileUrl}`}
>
{codeFileUrl}
</a>
</Link>
</div>
) : null}
{code ? (
Expand Down

0 comments on commit 2cb977e

Please sign in to comment.