Skip to content

Commit c3ec163

Browse files
committed
Remove Glime for it is closing.
1 parent ae43276 commit c3ec163

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/pages/index.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import {useEffect} from 'react';
32
import clsx from 'clsx';
43
import Layout from '@theme/Layout';
54
import Link from '@docusaurus/Link';
@@ -9,7 +8,6 @@ import styles from './index.module.css';
98
import HomepageFeatures from '../components/HomepageFeatures';
109
import hldHdImage from "../../static/img/SRS-SingleNode-4.0-hd.png";
1110
import hldSdImage from "../../static/img/SRS-SingleNode-4.0-sd.png";
12-
import useIsBrowser from "@docusaurus/core/lib/client/exports/useIsBrowser";
1311

1412
function HomepageHeader() {
1513
const context = useDocusaurusContext();
@@ -39,37 +37,6 @@ function HomepageHeader() {
3937
}
4038

4139
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-
7340
return (
7441
<Layout
7542
title={`SRS (Simple Realtime Server)`}

0 commit comments

Comments
 (0)