This commit is contained in:
Andras Schmelczer 2026-05-09 10:25:27 +01:00
parent dd9f00b105
commit 584b053a23
7 changed files with 36 additions and 43 deletions

View file

@ -197,7 +197,7 @@ export default function App() {
setShowLicenseSuccess(true); setShowLicenseSuccess(true);
} }
// Always refresh auth on startup to pick up server-side subscription changes // Always refresh auth on startup to pick up server-side subscription changes
refreshAuth().catch(() => { }); refreshAuth().catch(() => {});
}, []); // eslint-disable-line react-hooks/exhaustive-deps }, []); // eslint-disable-line react-hooks/exhaustive-deps
const savedSearches = useSavedSearches(user?.id ?? null); const savedSearches = useSavedSearches(user?.id ?? null);
@ -271,8 +271,8 @@ export default function App() {
{ page: activePage }, { page: activePage },
'', '',
pageToPath(activePage, inviteCode ?? undefined) + pageToPath(activePage, inviteCode ?? undefined) +
window.location.search + window.location.search +
window.location.hash window.location.hash
); );
} }
const handlePopState = (e: PopStateEvent) => { const handlePopState = (e: PopStateEvent) => {
@ -355,8 +355,8 @@ export default function App() {
initialLoading={initialLoading} initialLoading={initialLoading}
theme={theme} theme={theme}
pendingInfoFeature={null} pendingInfoFeature={null}
onClearPendingInfoFeature={() => { }} onClearPendingInfoFeature={() => {}}
onNavigateTo={() => { }} onNavigateTo={() => {}}
screenshotMode screenshotMode
ogMode={isOgMode} ogMode={isOgMode}
initialTravelTime={urlState.travelTime} initialTravelTime={urlState.travelTime}

View file

@ -119,10 +119,7 @@ export function DualHistogram({
})} })}
</div> </div>
{showMeanMarker && ( {showMeanMarker && (
<div <div className="pointer-events-none absolute inset-y-0" style={{ left: `${meanPct}%` }}>
className="pointer-events-none absolute inset-y-0"
style={{ left: `${meanPct}%` }}
>
<div <div
className="absolute top-0 max-w-[7rem] truncate rounded-sm border border-warm-300 bg-white px-1 py-0.5 text-[9px] font-medium leading-none text-warm-600 shadow-sm dark:border-warm-600 dark:bg-navy-900 dark:text-warm-300" className="absolute top-0 max-w-[7rem] truncate rounded-sm border border-warm-300 bg-white px-1 py-0.5 text-[9px] font-medium leading-none text-warm-600 shadow-sm dark:border-warm-600 dark:bg-navy-900 dark:text-warm-300"
style={meanLabelStyle} style={meanLabelStyle}

View file

@ -33,8 +33,9 @@ export function FeatureActions({
return ( return (
<div className="flex items-center gap-0.5 shrink-0"> <div className="flex items-center gap-0.5 shrink-0">
{feature.detail && onShowInfo && ( {feature.detail &&
showText ? ( onShowInfo &&
(showText ? (
<IconButton onClick={() => onShowInfo(feature)} title={t('filters.aboutData')} size="md"> <IconButton onClick={() => onShowInfo(feature)} title={t('filters.aboutData')} size="md">
<InfoIcon className="w-4 h-4" /> <InfoIcon className="w-4 h-4" />
</IconButton> </IconButton>
@ -42,8 +43,7 @@ export function FeatureActions({
<IconButton onClick={() => onShowInfo(feature)} title={t('filters.aboutData')} size="md"> <IconButton onClick={() => onShowInfo(feature)} title={t('filters.aboutData')} size="md">
<InfoIcon className="w-5 h-5 md:w-3.5 md:h-3.5" /> <InfoIcon className="w-5 h-5 md:w-3.5 md:h-3.5" />
</IconButton> </IconButton>
) ))}
)}
{showText ? ( {showText ? (
<IconButton <IconButton
onClick={() => onTogglePin(callbackName)} onClick={() => onTogglePin(callbackName)}

View file

@ -97,8 +97,8 @@ export default function Header({
const [copied, setCopied] = useState(false); const [copied, setCopied] = useState(false);
const [sharing, setSharing] = useState(false); const [sharing, setSharing] = useState(false);
const [menuOpen, setMenuOpen] = useState(false); const [menuOpen, setMenuOpen] = useState(false);
const [isDashboardTabletSidebarWidth, setIsDashboardTabletSidebarWidth] = useState(() => const [isDashboardTabletSidebarWidth, setIsDashboardTabletSidebarWidth] = useState(
window.matchMedia(DASHBOARD_TABLET_SIDEBAR_QUERY).matches () => window.matchMedia(DASHBOARD_TABLET_SIDEBAR_QUERY).matches
); );
const useSidebarNav = isMobile || (activePage === 'dashboard' && isDashboardTabletSidebarWidth); const useSidebarNav = isMobile || (activePage === 'dashboard' && isDashboardTabletSidebarWidth);

View file

@ -268,27 +268,27 @@ export function useDeckLayers({
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const pieProps: any = isEnum const pieProps: any = isEnum
? { ? {
extensions: [new PieHexExtension(requireEnumPalette(enumPaletteRef.current))], extensions: [new PieHexExtension(requireEnumPalette(enumPaletteRef.current))],
getCenter: (d: HexagonData) => [d.lon, d.lat], getCenter: (d: HexagonData) => [d.lon, d.lat],
getRatios0: (d: HexagonData) => { getRatios0: (d: HexagonData) => {
const r = distToRatios(d[distKey]); const r = distToRatios(d[distKey]);
return [r[0], r[1], r[2], r[3]]; return [r[0], r[1], r[2], r[3]];
}, },
getRatios1: (d: HexagonData) => { getRatios1: (d: HexagonData) => {
const r = distToRatios(d[distKey]); const r = distToRatios(d[distKey]);
return [r[4], r[5], r[6], r[7]]; return [r[4], r[5], r[6], r[7]];
}, },
getRatios2: (d: HexagonData) => { getRatios2: (d: HexagonData) => {
const r = distToRatios(d[distKey]); const r = distToRatios(d[distKey]);
return [r[8], r[9]]; return [r[8], r[9]];
}, },
updateTriggers: { updateTriggers: {
getCenter: [colorTrigger, data], getCenter: [colorTrigger, data],
getRatios0: [colorTrigger, data], getRatios0: [colorTrigger, data],
getRatios1: [colorTrigger, data], getRatios1: [colorTrigger, data],
getRatios2: [colorTrigger, data], getRatios2: [colorTrigger, data],
}, },
} }
: {}; : {};
return new H3HexagonLayer<HexagonData>({ return new H3HexagonLayer<HexagonData>({

View file

@ -1,6 +1,6 @@
@config "../tailwind.config.js"; @config "../tailwind.config.js";
@import "tailwindcss"; @import 'tailwindcss';
html, html,
body, body,
@ -66,7 +66,7 @@ h3 {
} }
.home-content-surface { .home-content-surface {
--home-hex-pattern: url("/home-hex-pattern.svg"); --home-hex-pattern: url('/home-hex-pattern.svg');
--home-pointer-active: 0; --home-pointer-active: 0;
--home-pointer-x: 50%; --home-pointer-x: 50%;
--home-pointer-y: 50%; --home-pointer-y: 50%;
@ -124,7 +124,7 @@ h3 {
} }
.dark .home-content-surface { .dark .home-content-surface {
--home-hex-pattern: url("/home-hex-pattern-dark.svg"); --home-hex-pattern: url('/home-hex-pattern-dark.svg');
background: linear-gradient(180deg, #121827 0%, #0a0e1a 42%, #10211f 100%); background: linear-gradient(180deg, #121827 0%, #0a0e1a 42%, #10211f 100%);
} }

View file

@ -77,10 +77,6 @@ const POI_FILTER_CONFIGS: Record<
}, },
}; };
function isPoiFilterNameValue(name: string): name is PoiFilterName {
return POI_FILTER_NAMES.includes(name as PoiFilterName);
}
function getConfig(filterName: PoiFilterName) { function getConfig(filterName: PoiFilterName) {
return POI_FILTER_CONFIGS[filterName]; return POI_FILTER_CONFIGS[filterName];
} }