Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Deploy: Consolidated gold tables, fixed nginx docs routing
Browse files
api/static/assets/index-DTUDyMVy.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
api/static/index.html
CHANGED
|
@@ -85,7 +85,7 @@
|
|
| 85 |
}
|
| 86 |
}
|
| 87 |
</script>
|
| 88 |
-
<script type="module" crossorigin src="/assets/index-
|
| 89 |
<link rel="stylesheet" crossorigin href="/assets/index-CbAcqLRk.css">
|
| 90 |
</head>
|
| 91 |
<body>
|
|
|
|
| 85 |
}
|
| 86 |
}
|
| 87 |
</script>
|
| 88 |
+
<script type="module" crossorigin src="/assets/index-DTUDyMVy.js"></script>
|
| 89 |
<link rel="stylesheet" crossorigin href="/assets/index-CbAcqLRk.css">
|
| 90 |
</head>
|
| 91 |
<body>
|
frontend/src/pages/PolicyMap.tsx
CHANGED
|
@@ -79,17 +79,23 @@ export default function PolicyMap() {
|
|
| 79 |
setSelectedTopic('')
|
| 80 |
setShowTopicSelector(true)
|
| 81 |
}
|
| 82 |
-
}, []) //
|
| 83 |
|
| 84 |
// Sync topic changes TO URL (when user selects a topic)
|
| 85 |
useEffect(() => {
|
|
|
|
|
|
|
| 86 |
if (selectedTopic && !showTopicSelector) {
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
setSearchParams({}, { replace: true })
|
| 91 |
}
|
| 92 |
-
}, [selectedTopic, showTopicSelector, setSearchParams])
|
| 93 |
|
| 94 |
const [page, setPage] = useState(1)
|
| 95 |
const limit = 20
|
|
|
|
| 79 |
setSelectedTopic('')
|
| 80 |
setShowTopicSelector(true)
|
| 81 |
}
|
| 82 |
+
}, [searchParams]) // Re-run when URL changes
|
| 83 |
|
| 84 |
// Sync topic changes TO URL (when user selects a topic)
|
| 85 |
useEffect(() => {
|
| 86 |
+
const currentTopicInUrl = searchParams.get('topic') || ''
|
| 87 |
+
|
| 88 |
if (selectedTopic && !showTopicSelector) {
|
| 89 |
+
// Only update URL if topic is different
|
| 90 |
+
if (currentTopicInUrl !== selectedTopic) {
|
| 91 |
+
setSearchParams({ topic: selectedTopic }, { replace: true })
|
| 92 |
+
console.log('📝 Updated URL with topic:', selectedTopic)
|
| 93 |
+
}
|
| 94 |
+
} else if (showTopicSelector && currentTopicInUrl) {
|
| 95 |
+
// Clear topic from URL if selector is shown
|
| 96 |
setSearchParams({}, { replace: true })
|
| 97 |
}
|
| 98 |
+
}, [selectedTopic, showTopicSelector, setSearchParams, searchParams])
|
| 99 |
|
| 100 |
const [page, setPage] = useState(1)
|
| 101 |
const limit = 20
|