wip: refactor chats to use zustand

This commit is contained in:
Ren Amamiya
2023-05-27 12:14:30 +07:00
parent 671b857077
commit 79e948ac05
21 changed files with 229 additions and 278 deletions

View File

@@ -1,16 +1,8 @@
import ArrowLeftIcon from "@icons/arrowLeft";
import ArrowRightIcon from "@icons/arrowRight";
import EventCollector from "@shared/eventCollector";
import useSWR from "swr";
const fetcher = async () => {
const { platform } = await import("@tauri-apps/api/os");
return await platform();
};
export default function AppHeader() {
const { data: platform } = useSWR("platform", fetcher);
export function AppHeader() {
const goBack = () => {
window.history.back();
};
@@ -19,10 +11,6 @@ export default function AppHeader() {
window.history.forward();
};
const reload = () => {
window.location.reload();
};
return (
<div
data-tauri-drag-region