feat: readd default columns

This commit is contained in:
2024-03-20 15:12:54 +07:00
parent 5d59040224
commit cb565ff35b
20 changed files with 580 additions and 79 deletions

View File

@@ -15,7 +15,7 @@ export function Col({
const window = useMemo(() => getCurrent(), []);
const container = useRef<HTMLDivElement>(null);
const [webview, setWebview] = useState("");
const [webview, setWebview] = useState<string>(null);
const createWebview = async () => {
const rect = container.current.getBoundingClientRect();
@@ -36,6 +36,7 @@ export function Col({
};
const closeWebview = async () => {
if (!webview) return;
await invoke("close_column", {
label: webview,
});
@@ -67,7 +68,7 @@ export function Col({
return () => {
closeWebview();
};
}, [window]);
}, []);
return <div ref={container} className="h-full w-[440px] shrink-0 p-2" />;
}