File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
"use client"
2
2
3
+ import { useContext } from "react"
3
4
import { MdClose } from "react-icons/md"
4
5
5
6
import { Button } from "@/components/ui/buttons/Button"
@@ -14,9 +15,11 @@ import {
14
15
import FixedDot from "./FixedDot"
15
16
import { useFeedbackWidget } from "./useFeedbackWidget"
16
17
18
+ import { FeedbackWidgetContext } from "@/contexts/FeedbackWidgetContext"
17
19
import { useTranslation } from "@/hooks/useTranslation"
18
20
19
21
const FeedbackWidget = ( ) => {
22
+ const { showFeedbackWidget } = useContext ( FeedbackWidgetContext )
20
23
const { t } = useTranslation ( "common" )
21
24
const {
22
25
offsetBottom,
@@ -29,6 +32,9 @@ const FeedbackWidget = () => {
29
32
isExpanded,
30
33
isOpen,
31
34
} = useFeedbackWidget ( )
35
+
36
+ if ( ! showFeedbackWidget ) return null
37
+
32
38
return (
33
39
< >
34
40
< Popover
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ export const BaseLayout: StoryObj<typeof meta> = {
39
39
< ListenToPlayer slug = "/eth" />
40
40
</ div >
41
41
) ,
42
- contentIsOutdated : false ,
43
- contentNotTranslated : false ,
42
+ // contentIsOutdated: false,
43
+ // contentNotTranslated: false,
44
44
lastDeployLocaleTimestamp : "May 14, 2021" ,
45
45
} ,
46
46
}
Original file line number Diff line number Diff line change
1
+ "use client"
2
+
1
3
import { useContext , useEffect , useState } from "react"
2
4
import { Howl } from "howler"
3
5
import { Portal } from "@radix-ui/react-portal"
Original file line number Diff line number Diff line change 1
1
// import { join } from "path"
2
- import { useContext } from "react"
3
2
import dynamic from "next/dynamic"
4
3
5
4
import type { Root } from "@/lib/types"
@@ -8,8 +7,6 @@ import Footer from "@/components/Footer"
8
7
import Nav from "@/components/Nav"
9
8
import { SkipLink } from "@/components/SkipLink"
10
9
11
- import { FeedbackWidgetContext } from "@/contexts/FeedbackWidgetContext"
12
-
13
10
// import TranslationBanner from "@/components/TranslationBanner"
14
11
// import TranslationBannerLegal from "@/components/TranslationBannerLegal"
15
12
// import { toPosixPath } from "@/lib/utils/relativePath"
@@ -25,7 +22,6 @@ export const BaseLayout = ({
25
22
// contentNotTranslated,
26
23
lastDeployLocaleTimestamp,
27
24
} : Root ) => {
28
- const { showFeedbackWidget } = useContext ( FeedbackWidgetContext )
29
25
// const { locale, asPath } = useRouter()
30
26
31
27
// const CONTRIBUTING = "/contributing/"
@@ -79,7 +75,7 @@ export const BaseLayout = ({
79
75
* layout on initial load.
80
76
*/ }
81
77
82
- { showFeedbackWidget && < FeedbackWidget /> }
78
+ < FeedbackWidget />
83
79
</ >
84
80
)
85
81
}
You can’t perform that action at this time.
0 commit comments