diff --git a/src/components/viewer3d/ModelViewer3D.tsx b/src/components/viewer3d/ModelViewer3D.tsx index 905c71c..4ca264c 100644 --- a/src/components/viewer3d/ModelViewer3D.tsx +++ b/src/components/viewer3d/ModelViewer3D.tsx @@ -299,7 +299,7 @@ export const ModelViewer3D: React.FC = ({ // Update Model in Scene & Carregar Rotação Memorizada useEffect(() => { - if (!sceneRef.current || !modelData) return; + if (!sceneRef.current) return; // Remove old model if present if (modelGroupRef.current) { @@ -307,6 +307,8 @@ export const ModelViewer3D: React.FC = ({ modelGroupRef.current = null; } + if (!modelData) return; + const group = modelData.sceneGroup; modelGroupRef.current = group; sceneRef.current.add(group); diff --git a/test_db.ts b/test_db.ts new file mode 100644 index 0000000..51524f3 --- /dev/null +++ b/test_db.ts @@ -0,0 +1,7 @@ +import { createClient } from '@supabase/supabase-js'; +const supabase = createClient('https://supabase.reifonas.cloud', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzdXBhYmFzZSIsImlhdCI6MTc3Mjk5NTUwMCwiZXhwIjo0OTI4NjY5MTAwLCJyb2xlIjoiYW5vbiJ9.kOAYmQJlNd3LsssUHaNyvWZpa2sunfpLj24F_X-PRNY', { db: { schema: 'TS_ERP' } }); +async function run() { + const { data } = await supabase.from('profiles').select('*').eq('email', 'admtracksteel@gmail.com.br'); + console.log('admtracksteel:', data); +} +run();