fuzzyworld

when-am-i / commit

linkify header, moved icon

0f7dce256aa77f828d94847215a203a09f04eee5 · Pavel Safronov · 2026-06-20 20:14:08 -0700 · parents 854a497d9099

linkify header, moved icon
 src/App.tsx | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/App.tsx b/src/App.tsx
index c027562..ae21495 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -149,12 +149,18 @@ function App() {
         recentCalendars.current = [scene.calendar, ...recentCalendars.current].slice(0, SHUFFLE_RECENT_WINDOW);
     };
 
+    const rootUrl = typeof window !== 'undefined' ? `${window.location.origin}${window.location.pathname}` : '/';
+    console.log(`root URL: ${rootUrl}`);
+
     return (
         <div className="app">
-            <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
-                <h1 style={{ margin: 0 }}>When am I?</h1>
-                <img src={calendar} alt="" style={{ width: 40, height: 40 }} />
-            </div>
+            <a href={rootUrl} style={{ textDecoration: 'none', color: 'inherit' }}>
+                <div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
+                    <img src={calendar} alt="" style={{ width: 40, height: 40 }} />
+                    <h1 style={{ margin: 0 }}>When am I?</h1>
+                </div>
+            </a>
+
             <p style={{ marginTop: 12 }}>
                 You&rsquo;re a time traveler who lands somewhere in history. You stop a local
                 and ask: <em>&ldquo;When am I?&rdquo;</em> Their answer depends on where