1
1
import React from 'react' ;
2
- import { useEffect } from 'react' ;
3
2
import clsx from 'clsx' ;
4
3
import Layout from '@theme/Layout' ;
5
4
import Link from '@docusaurus/Link' ;
@@ -9,7 +8,6 @@ import styles from './index.module.css';
9
8
import HomepageFeatures from '../components/HomepageFeatures' ;
10
9
import hldHdImage from "../../static/img/SRS-SingleNode-4.0-hd.png" ;
11
10
import hldSdImage from "../../static/img/SRS-SingleNode-4.0-sd.png" ;
12
- import useIsBrowser from "@docusaurus/core/lib/client/exports/useIsBrowser" ;
13
11
14
12
function HomepageHeader ( ) {
15
13
const context = useDocusaurusContext ( ) ;
@@ -39,37 +37,6 @@ function HomepageHeader() {
39
37
}
40
38
41
39
export default function Home ( ) {
42
- const isBrowser = useIsBrowser ( ) ;
43
-
44
- useEffect ( ( ) => {
45
- const loadGlimeScript = ( ) => {
46
- const script = document . createElement ( 'script' ) ;
47
- script . src = 'https://cdn.glimelab.ai/widget/1.0.0/widget.js' ;
48
-
49
- script . onload = ( ) => {
50
- // Call the window.glime.init function here
51
- window . glime . init ( `odGnkiPMumIMJp` , { styles : { baseFontSize : 16 , theme : "dark" | "light" | "auto" , hideCollapsedButton : false } } ) ;
52
- } ;
53
-
54
- document . head . appendChild ( script ) ;
55
- } ;
56
-
57
- if ( isBrowser ) {
58
- loadGlimeScript ( ) ;
59
- }
60
-
61
- return ( ) => {
62
- // Clean up any resources when the component unmounts
63
- if ( isBrowser ) {
64
- // Remove glime script if added to the DOM
65
- const script = document . querySelector ( `script[src="https://cdn.glimelab.ai/widget/1.0.0/widget.js"]` ) ;
66
- if ( script ) {
67
- script . remove ( ) ;
68
- }
69
- }
70
- } ;
71
- } , [ isBrowser ] ) ;
72
-
73
40
return (
74
41
< Layout
75
42
title = { `SRS (Simple Realtime Server)` }
0 commit comments