File tree 3 files changed +24
-4
lines changed 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 38
38
"react" : " ^17.0.2" ,
39
39
"react-dom" : " ^17.0.2" ,
40
40
"react-transition-group" : " ^4.4.2" ,
41
- "sass" : " ^1.49.8"
41
+ "sass" : " ^1.49.8" ,
42
+ "uuid" : " ^9.0.0"
42
43
},
43
44
"devDependencies" : {
44
45
"@docusaurus/module-type-aliases" : " ^2.1.0" ,
Original file line number Diff line number Diff line change 1
- import React from "react" ;
1
+ import React , { useEffect } from "react" ;
2
2
import Link from "@docusaurus/Link" ;
3
3
import useBaseUrl from "@docusaurus/useBaseUrl" ;
4
4
import GithubIcon from "@site/static/icons/github.svg" ;
@@ -7,8 +7,17 @@ import DiscordIcon from "@site/static/icons/discord.svg";
7
7
import LinkedInIcon from "@site/static/icons/linkedin.svg" ;
8
8
import YoutubeIcon from "@site/static/icons/youtube.svg" ;
9
9
import styles from "./styles.module.scss" ;
10
+ import { v4 as uuidv4 } from 'uuid' ;
11
+ const CustomFooter = ( ) => {
10
12
11
- const CustomFooter = ( ) => (
13
+ useEffect ( ( ) => {
14
+ if ( ! localStorage . getItem ( 'hasuraDocsUserID' ) ) {
15
+ const userID = uuidv4 ( ) ;
16
+ localStorage . setItem ( 'hasuraDocsUserID' , userID ) ;
17
+ }
18
+ } , [ ] ) ;
19
+
20
+ return (
12
21
< footer className = { styles [ "custom-footer-wrapper" ] } >
13
22
< div className = { styles [ "logo-wrapper" ] } >
14
23
< img src = { useBaseUrl ( "/img/logo-light.svg" ) } className = { styles [ "dark-theme-logo" ] } />
@@ -65,6 +74,6 @@ const CustomFooter = () => (
65
74
</ div >
66
75
</ div >
67
76
</ footer >
68
- ) ;
77
+ ) } ;
69
78
70
79
export default CustomFooter ;
Original file line number Diff line number Diff line change @@ -5521,6 +5521,7 @@ __metadata:
5521
5521
sass : ^1.49.8
5522
5522
swc-loader : ^0.2.3
5523
5523
typescript : ^4.8.4
5524
+ uuid : ^9.0.0
5524
5525
languageName : unknown
5525
5526
linkType : soft
5526
5527
@@ -11457,6 +11458,15 @@ __metadata:
11457
11458
languageName : node
11458
11459
linkType : hard
11459
11460
11461
+ " uuid@npm:^9.0.0 " :
11462
+ version : 9.0.0
11463
+ resolution : " uuid@npm:9.0.0"
11464
+ bin :
11465
+ uuid : dist/bin/uuid
11466
+ checksum : 8dd2c83c43ddc7e1c71e36b60aea40030a6505139af6bee0f382ebcd1a56f6cd3028f7f06ffb07f8cf6ced320b76aea275284b224b002b289f89fe89c389b028
11467
+ languageName : node
11468
+ linkType : hard
11469
+
11460
11470
" value-equal@npm:^1.0.1 " :
11461
11471
version : 1.0.1
11462
11472
resolution : " value-equal@npm:1.0.1"
You can’t perform that action at this time.
0 commit comments