11"use client" ;
22
3- import { FC } from "react" ;
3+ import { FC , useEffect } from "react" ;
44import Link from "next/link" ;
55import { Logo } from "ui/Logo" ;
66import { FooterForm } from "./form" ;
@@ -12,9 +12,22 @@ import { BsGithub, BsTwitterX, BsDiscord } from "react-icons/bs";
1212
1313import s from "styling/modules/Footer/global.module.scss" ;
1414
15- export const Footer : FC = ( { } ) => {
15+ export const Footer : FC = ( ) => {
1616 const pathname = usePathname ( ) ;
1717
18+ // Load Trustpilot script dynamically
19+ useEffect ( ( ) => {
20+ const script = document . createElement ( "script" ) ;
21+ script . type = "text/javascript" ;
22+ script . src = "//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" ;
23+ script . async = true ;
24+ document . body . appendChild ( script ) ;
25+
26+ return ( ) => {
27+ document . body . removeChild ( script ) ;
28+ } ;
29+ } , [ ] ) ;
30+
1831 if ( pathname . startsWith ( "/docs" ) ) {
1932 return null ;
2033 }
@@ -92,6 +105,25 @@ export const Footer: FC = ({ }) => {
92105 </ Tooltip >
93106 ) ) }
94107 </ div >
108+
109+ { /* Example TrustBox container */ }
110+ < div
111+ className = "trustpilot-widget"
112+ data-locale = "en-GB"
113+ data-template-id = "53aa8807dec7e10d38f59f36"
114+ data-businessunit-id = "YOUR_BUSINESS_UNIT_ID"
115+ data-style-height = "150px"
116+ data-style-width = "100%"
117+ data-theme = "dark"
118+ >
119+ < a
120+ href = "https://uk.trustpilot.com/review/nodebyte.host"
121+ target = "_blank"
122+ rel = "noopener noreferrer"
123+ >
124+ Trustpilot
125+ </ a >
126+ </ div >
95127 </ div >
96128 </ section >
97129 </ section >
@@ -103,4 +135,4 @@ export const Footer: FC = ({ }) => {
103135 </ section >
104136 </ footer >
105137 ) ;
106- } ;
138+ } ;
0 commit comments