Migrated to WXT

This commit is contained in:
n4ze3m
2024-03-23 14:44:05 +05:30
parent 4aff7f991a
commit b33ee0366c
63 changed files with 2904 additions and 388 deletions

View File

@@ -0,0 +1,31 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
import { MemoryRouter } from "react-router-dom"
import { SidepanelRouting } from "~/routes"
import { ToastContainer } from "react-toastify"
import "react-toastify/dist/ReactToastify.css"
const queryClient = new QueryClient()
import { ConfigProvider, theme } from "antd"
import { StyleProvider } from "@ant-design/cssinjs"
import { useDarkMode } from "~/hooks/useDarkmode"
function IndexSidepanel() {
const { mode } = useDarkMode()
return (
<MemoryRouter>
<ConfigProvider
theme={{
algorithm:
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
}}>
<StyleProvider hashPriority="high">
<QueryClientProvider client={queryClient}>
<SidepanelRouting />
<ToastContainer />
</QueryClientProvider>
</StyleProvider>
</ConfigProvider>
</MemoryRouter>
)
}
export default IndexSidepanel

View File

@@ -0,0 +1,14 @@
<!doctype html>
<html>
<head>
<title>Page Assist - Web UI</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="manifest.type" content="browser_action" />
<link href="~/assets/tailwind.css" rel="stylesheet" />
<meta charset="utf-8" />
</head>
<body class="bg-white dark:bg-[#171717]">
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>

View File

@@ -0,0 +1,9 @@
import React from "react"
import ReactDOM from "react-dom/client"
import IndexSidepanel from "./App"
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<IndexSidepanel />
</React.StrictMode>
)