Spaces:
Running
Running
File size: 1,201 Bytes
16ab111 72f0edb 16ab111 912e2d8 16ab111 72f0edb 16ab111 72f0edb 16ab111 72f0edb 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 27 28 29 30 31 32 33 34 35 36 37 |
import React, { useEffect } from "react";
import Layout from "@/components/layout/Layout";
import { UrdfSelectionModalContainer } from "@/components/UrdfSelectionModalContainer";
import { useUrdf } from "@/hooks/useUrdf";
// This is needed to make TypeScript recognize webkitdirectory as a valid attribute
declare module "react" {
interface InputHTMLAttributes<T> extends React.HTMLAttributes<T> {
directory?: string;
webkitdirectory?: string;
}
}
const UrdfView: React.FC = () => {
// Get the setIsDefaultModel function from the useUrdf hook
const { setIsDefaultModel } = useUrdf();
// Set isDefaultModel to true when the component mounts
useEffect(() => {
setIsDefaultModel(true);
console.log("🤖 Playground opened: Setting default model to true");
}, [setIsDefaultModel]);
return (
<div className="flex flex-col h-screen bg-netflix-background text-white overflow-hidden">
{/* Layout taking full height */}
<div className="w-full h-full">
<Layout />
</div>
{/* Selection Modal Container - positioned at root level to avoid nesting issues */}
<UrdfSelectionModalContainer />
</div>
);
};
export default UrdfView;
|