mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
Docs: Add user ID for upcoming chatbot
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9020 GitOrigin-RevId: 10d9206d764abb33a059536b328f20fb3f03483d
This commit is contained in:
parent
9e65da5429
commit
9fcc7f8ccf
@ -38,7 +38,8 @@
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-transition-group": "^4.4.2",
|
||||
"sass": "^1.49.8"
|
||||
"sass": "^1.49.8",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "^2.1.0",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import React, { useEffect } from "react";
|
||||
import Link from "@docusaurus/Link";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import GithubIcon from "@site/static/icons/github.svg";
|
||||
@ -7,8 +7,17 @@ import DiscordIcon from "@site/static/icons/discord.svg";
|
||||
import LinkedInIcon from "@site/static/icons/linkedin.svg";
|
||||
import YoutubeIcon from "@site/static/icons/youtube.svg";
|
||||
import styles from "./styles.module.scss";
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
const CustomFooter = () => {
|
||||
|
||||
const CustomFooter = () => (
|
||||
useEffect(() => {
|
||||
if (!localStorage.getItem('hasuraDocsUserID')) {
|
||||
const userID = uuidv4();
|
||||
localStorage.setItem('hasuraDocsUserID', userID);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<footer className={styles["custom-footer-wrapper"]}>
|
||||
<div className={styles["logo-wrapper"]}>
|
||||
<img src={useBaseUrl("/img/logo-light.svg")} className={styles["dark-theme-logo"]} />
|
||||
@ -65,6 +74,6 @@ const CustomFooter = () => (
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
)};
|
||||
|
||||
export default CustomFooter;
|
||||
|
@ -5521,6 +5521,7 @@ __metadata:
|
||||
sass: ^1.49.8
|
||||
swc-loader: ^0.2.3
|
||||
typescript: ^4.8.4
|
||||
uuid: ^9.0.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@ -11457,6 +11458,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^9.0.0":
|
||||
version: 9.0.0
|
||||
resolution: "uuid@npm:9.0.0"
|
||||
bin:
|
||||
uuid: dist/bin/uuid
|
||||
checksum: 8dd2c83c43ddc7e1c71e36b60aea40030a6505139af6bee0f382ebcd1a56f6cd3028f7f06ffb07f8cf6ced320b76aea275284b224b002b289f89fe89c389b028
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"value-equal@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "value-equal@npm:1.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user