fix: server data is loaded on settings page #363 (#414)

This commit is contained in:
Meier Lukas
2024-05-01 21:57:24 +02:00
committed by GitHub
parent 84801d3174
commit 7c98b65401
4 changed files with 16 additions and 2 deletions

View File

@@ -10,10 +10,17 @@ import { GlobalItemServerDataProvider } from "./provider";
type Board = RouterOutputs["board"]["getDefaultBoard"];
type Props = PropsWithChildren<{
shouldRun: boolean;
board: Board;
}>;
export const GlobalItemServerDataRunner = ({ board, children }: Props) => {
export const GlobalItemServerDataRunner = ({
board,
shouldRun,
children,
}: Props) => {
if (!shouldRun) return children;
const allItems = board.sections.flatMap((section) => section.items);
return (