A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix: issue with category removal and ready state (#129)
Meier Lukas1e414af57c60
diff --git a/apps/nextjs/src/app/[locale]/boards/_context.tsx b/apps/nextjs/src/app/[locale]/boards/_context.tsxindex e3b69f1cb..82678dd63 100644--- a/apps/nextjs/src/app/[locale]/boards/_context.tsx+++ b/apps/nextjs/src/app/[locale]/boards/_context.tsx@@ -1,7 +1,13 @@"use client";import type { PropsWithChildren } from "react";-import { createContext, useCallback, useContext, useState } from "react";+import {+ createContext,+ useCallback,+ useContext,+ useEffect,+ useState,+} from "react";import type { RouterOutputs } from "@homarr/api";import { clientApi } from "@homarr/api/client";@@ -24,6 +30,15 @@ export const BoardProvider = ({refetchOnReconnect: false,});+ useEffect(() => {+ setReadySections((previous) =>+ previous.filter((id) =>+ data.sections.some((section) => section.id === id),+ ),+ );+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [data.sections.length, setReadySections]);+const markAsReady = useCallback((id: string) => {setReadySections((previous) =>previous.includes(id) ? previous : [...previous, id],