feat: add theme color param to widget

This commit is contained in:
Tristan Yang
2023-02-08 17:27:10 +08:00
parent ffd68f2c06
commit 9cefd14565
8 changed files with 22 additions and 11 deletions
+2 -1
View File
@@ -8,8 +8,9 @@ import './i18n';
const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement);
const hostId = new URLSearchParams(location.search).get("host");
const themeColor = new URLSearchParams(location.search).get("themeColor") || "#1fe1f9";
root.render(
hostId ? <Provider store={store}>
<Widget hostId={Number(hostId)} />
<Widget hostId={Number(hostId)} themeColor={themeColor} />
</Provider> : null
);