Lots of improvements
This commit is contained in:
parent
ef921361ec
commit
80a5a2a774
21 changed files with 489 additions and 337 deletions
|
|
@ -169,6 +169,9 @@ export function useMapData({
|
|||
const params = new URLSearchParams({ bounds: boundsStr });
|
||||
if (filtersStr) params.set('filters', filtersStr);
|
||||
params.set('fields', viewFeature && !viewFeature.startsWith('tt_') ? viewFeature : '');
|
||||
if (travelParam) {
|
||||
params.set('travel', travelParam);
|
||||
}
|
||||
const res = await fetch(
|
||||
apiUrl('postcodes', params),
|
||||
authHeaders({
|
||||
|
|
@ -261,7 +264,7 @@ export function useMapData({
|
|||
|
||||
const vals: number[] = [];
|
||||
|
||||
if (usePostcodeView && !isTravelTime) {
|
||||
if (usePostcodeView) {
|
||||
if (effectivePostcodeData.length === 0) return null;
|
||||
for (const feat of effectivePostcodeData) {
|
||||
if (bounds) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ export function useTheme() {
|
|||
root.classList.remove('dark');
|
||||
}
|
||||
localStorage.setItem('theme', theme);
|
||||
const color = theme === 'dark' ? '#0a0e1a' : '#fafaf9';
|
||||
document.querySelectorAll('meta[name="theme-color"]').forEach((m) => {
|
||||
m.setAttribute('content', color);
|
||||
});
|
||||
}, [theme]);
|
||||
|
||||
const toggleTheme = useCallback(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue