feat(page): Optimize data handling with useMemo for boards, agents, and gateways
This commit is contained in:
@@ -50,10 +50,6 @@ export default function NewBoardPage() {
|
||||
|
||||
const isFormReady = Boolean(name.trim() && gatewayId);
|
||||
|
||||
const selectedGateway = useMemo(
|
||||
() => gateways.find((gateway) => gateway.id === gatewayId) || null,
|
||||
[gateways, gatewayId]
|
||||
);
|
||||
const gatewayOptions = useMemo(
|
||||
() => gateways.map((gateway) => ({ value: gateway.id, label: gateway.name })),
|
||||
[gateways]
|
||||
|
||||
Reference in New Issue
Block a user