import React, { useEffect, useState } from "react"; import logo_light from "../assets/logo_light_46.png"; import logo_dark from "../assets/logo_dark_46.png"; import { Banner, Button, Input, Upload } from "@douyinfe/semi-ui"; import { IconSun, IconMoon, IconGithubLogo, IconPaperclip, } from "@douyinfe/semi-icons"; import RichEditor from "../components/rich_editor"; export default function BugReport() { const [theme, setTheme] = useState(""); useEffect(() => { const t = localStorage.getItem("theme"); setTheme(t); if (t === "dark") { const body = document.body; if (body.hasAttribute("theme-mode")) { body.setAttribute("theme-mode", "dark"); } } else { const body = document.body; if (body.hasAttribute("theme-mode")) { body.setAttribute("theme-mode", "light"); } } document.title = "Report a bug - drawDB"; document.body.setAttribute("class", "theme"); }, [setTheme]); const changeTheme = () => { const body = document.body; const t = body.getAttribute("theme-mode"); if (t === "dark") { if (body.hasAttribute("theme-mode")) { body.setAttribute("theme-mode", "light"); setTheme("light"); } } else { if (body.hasAttribute("theme-mode")) { body.setAttribute("theme-mode", "dark"); setTheme("dark"); } } }; return ( <>