remove options script

This commit is contained in:
Gabe Yuan
2023-08-06 23:30:00 +08:00
parent 5443392465
commit 5afb816648
3 changed files with 40 additions and 81 deletions

View File

@@ -1,45 +1,45 @@
import React, { useEffect, useState } from "react";
import ReactDOM from "react-dom/client";
// import React, { useEffect, useState } from "react";
// import ReactDOM from "react-dom/client";
const App = () => {
const [loading, setLoading] = useState(true);
// const App = () => {
// const [loading, setLoading] = useState(true);
useEffect(() => {
const timer = setTimeout(() => {
if (!document.querySelector("header")) {
setLoading(false);
}
}, 5000);
return () => {
clearTimeout(timer);
};
}, []);
// useEffect(() => {
// const timer = setTimeout(() => {
// if (!document.querySelector("header")) {
// setLoading(false);
// }
// }, 5000);
// return () => {
// clearTimeout(timer);
// };
// }, []);
if (loading) {
return (
<center>
<p>KISS Translator</p>
<h1 style={{ textAlign: "center" }}>loading...</h1>
</center>
);
}
// if (loading) {
// return (
// <center>
// <p>KISS Translator</p>
// <h1 style={{ textAlign: "center" }}>loading...</h1>
// </center>
// );
// }
return (
<center>
<p>
<a href={process.env.REACT_APP_HOMEPAGE}>KISS Translator</a> Script not
installed or disabled!
</p>
<h1>
<a href={process.env.REACT_APP_HOMEPAGE}>Click here read more!</a>
</h1>
</center>
);
};
// return (
// <center>
// <p>
// <a href={process.env.REACT_APP_HOMEPAGE}>KISS Translator</a> Script not
// installed or disabled!
// </p>
// <h1>
// <a href={process.env.REACT_APP_HOMEPAGE}>Click here read more!</a>
// </h1>
// </center>
// );
// };
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
// const root = ReactDOM.createRoot(document.getElementById("root"));
// root.render(
// <React.StrictMode>
// <App />
// </React.StrictMode>
// );