i forgot this 💀

This commit is contained in:
emirsassan 2025-07-10 09:32:25 +03:00
parent cc2a0f284a
commit 72157f689b

View file

@ -1,41 +1,13 @@
import Navbar from '@/components/Navbar';
import useNotifications from '@/hooks/useNotification';
import { bindings } from '@/main';
import { AnimatedOutlet } from '@onelauncher/common/components';
import { createFileRoute } from '@tanstack/react-router';
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
import { useEffect } from 'react';
export const Route = createFileRoute('/app')({
component: RouteComponent,
});
function RouteComponent() {
const { set, remove } = useNotifications();
useEffect(() => {
let unlisten: (() => void) | undefined;
(async () => {
unlisten = await bindings.events.ingress.on((e) => {
if (typeof e.ingress_type === 'object')
if ('PrepareCluster' in e.ingress_type) {
const { cluster_name } = e.ingress_type.PrepareCluster;
let id = `cluster-${cluster_name}`;
set(id, {
title: 'Preparing Cluster',
message: e.message,
});
if (e.percent === e.total)
remove(id);
}
});
})();
return () => unlisten?.();
}, [set, remove]);
return (
<>
<div className="flex flex-col px-4">