Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/hiptyc_2020_8k.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BrowserRouter, Route, Routes, useLocation } from 'react-router-dom';
import { useState } from 'react';
import Header from './components/Header';
import Home from './pages/Home';
import Research from './pages/Research';
Expand All @@ -16,11 +17,26 @@ function App() {
function AppContent() {
const location = useLocation();
const isSpacePage = location.pathname === '/space';
const [uiVisible, setUiVisible] = useState(false);

// Handle skybox loaded - trigger UI fade in
const handleSkyboxLoaded = () => {
setTimeout(() => {
setUiVisible(true);
}, 500);
};

return (
<>
<Starfield />
<div style={{ position: 'relative', zIndex: 1 }}>
<Starfield onSkyboxLoaded={handleSkyboxLoaded} uiVisible={uiVisible} />
<div
style={{
position: 'relative',
zIndex: 1,
opacity: uiVisible ? 1 : 0,
transition: 'opacity 0.5s ease-in-out'
}}
>
{!isSpacePage && <Header />}
<main>
<Routes>
Expand Down
Loading