diff --git a/gcs/src/components/dashboard/tabsSectionTabs/preFlightChecklistSection.jsx b/gcs/src/components/dashboard/tabsSectionTabs/preFlightChecklistSection.jsx index 288790f53..162de2254 100644 --- a/gcs/src/components/dashboard/tabsSectionTabs/preFlightChecklistSection.jsx +++ b/gcs/src/components/dashboard/tabsSectionTabs/preFlightChecklistSection.jsx @@ -4,7 +4,7 @@ */ // Native imports -import { useState } from "react" +import { useEffect, useState } from "react" // 3rd Party Imports import { Tabs, Accordion, Button, Modal, TextInput } from "@mantine/core" @@ -64,9 +64,10 @@ export default function PreFlightChecklistTab({ tabPadding }) { // Show error message showErrorNotification("Name cannot be empty") } - + useEffect(() => { + AddCommand("new_preflight_checklist", () => setNewChecklistModal(true)) + }, []) // Add create new checklist as a spotlight command - AddCommand("new_preflight_checklist", () => setNewChecklistModal(true)) const items = preFlightChecklistItems.map((item) => ( { + AddCommand("connect_to_drone", connectToDroneFromButton) + AddCommand("disconnect_from_drone", disconnect) + }, []) + const linkClassName = "text-md px-2 rounded-sm outline-none focus:text-falconred-400 hover:text-falconred-400 transition-colors delay-50"