File size: 717 Bytes
16ab111
 
 
 
6bc7874
16ab111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { useUrdf } from "@/hooks/useUrdf";
import { UrdfSelectionModal } from "@/components/ui/UrdfSelectionModal";

/**
 * Container component that manages the Urdf selection modal.
 * This is meant to be placed in the application layout to ensure the modal
 * is accessible throughout the application without nesting issues.
 */
export function UrdfSelectionModalContainer() {
  const {
    isSelectionModalOpen,
    setIsSelectionModalOpen,
    urdfModelOptions,
    selectUrdfModel,
  } = useUrdf();

  return (
    <UrdfSelectionModal
      isOpen={isSelectionModalOpen}
      onClose={() => setIsSelectionModalOpen(false)}
      urdfModels={urdfModelOptions}
      onSelectModel={selectUrdfModel}
    />
  );
}