Lint
This commit is contained in:
parent
dd9f00b105
commit
584b053a23
7 changed files with 36 additions and 43 deletions
|
|
@ -197,7 +197,7 @@ export default function App() {
|
|||
setShowLicenseSuccess(true);
|
||||
}
|
||||
// Always refresh auth on startup to pick up server-side subscription changes
|
||||
refreshAuth().catch(() => { });
|
||||
refreshAuth().catch(() => {});
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
const savedSearches = useSavedSearches(user?.id ?? null);
|
||||
|
|
@ -271,8 +271,8 @@ export default function App() {
|
|||
{ page: activePage },
|
||||
'',
|
||||
pageToPath(activePage, inviteCode ?? undefined) +
|
||||
window.location.search +
|
||||
window.location.hash
|
||||
window.location.search +
|
||||
window.location.hash
|
||||
);
|
||||
}
|
||||
const handlePopState = (e: PopStateEvent) => {
|
||||
|
|
@ -355,8 +355,8 @@ export default function App() {
|
|||
initialLoading={initialLoading}
|
||||
theme={theme}
|
||||
pendingInfoFeature={null}
|
||||
onClearPendingInfoFeature={() => { }}
|
||||
onNavigateTo={() => { }}
|
||||
onClearPendingInfoFeature={() => {}}
|
||||
onNavigateTo={() => {}}
|
||||
screenshotMode
|
||||
ogMode={isOgMode}
|
||||
initialTravelTime={urlState.travelTime}
|
||||
|
|
|
|||
|
|
@ -119,10 +119,7 @@ export function DualHistogram({
|
|||
})}
|
||||
</div>
|
||||
{showMeanMarker && (
|
||||
<div
|
||||
className="pointer-events-none absolute inset-y-0"
|
||||
style={{ left: `${meanPct}%` }}
|
||||
>
|
||||
<div className="pointer-events-none absolute inset-y-0" style={{ left: `${meanPct}%` }}>
|
||||
<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"
|
||||
style={meanLabelStyle}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,9 @@ export function FeatureActions({
|
|||
|
||||
return (
|
||||
<div className="flex items-center gap-0.5 shrink-0">
|
||||
{feature.detail && onShowInfo && (
|
||||
showText ? (
|
||||
{feature.detail &&
|
||||
onShowInfo &&
|
||||
(showText ? (
|
||||
<IconButton onClick={() => onShowInfo(feature)} title={t('filters.aboutData')} size="md">
|
||||
<InfoIcon className="w-4 h-4" />
|
||||
</IconButton>
|
||||
|
|
@ -42,8 +43,7 @@ export function FeatureActions({
|
|||
<IconButton onClick={() => onShowInfo(feature)} title={t('filters.aboutData')} size="md">
|
||||
<InfoIcon className="w-5 h-5 md:w-3.5 md:h-3.5" />
|
||||
</IconButton>
|
||||
)
|
||||
)}
|
||||
))}
|
||||
{showText ? (
|
||||
<IconButton
|
||||
onClick={() => onTogglePin(callbackName)}
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ export default function Header({
|
|||
const [copied, setCopied] = useState(false);
|
||||
const [sharing, setSharing] = useState(false);
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
const [isDashboardTabletSidebarWidth, setIsDashboardTabletSidebarWidth] = useState(() =>
|
||||
window.matchMedia(DASHBOARD_TABLET_SIDEBAR_QUERY).matches
|
||||
const [isDashboardTabletSidebarWidth, setIsDashboardTabletSidebarWidth] = useState(
|
||||
() => window.matchMedia(DASHBOARD_TABLET_SIDEBAR_QUERY).matches
|
||||
);
|
||||
const useSidebarNav = isMobile || (activePage === 'dashboard' && isDashboardTabletSidebarWidth);
|
||||
|
||||
|
|
|
|||
|
|
@ -268,27 +268,27 @@ export function useDeckLayers({
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const pieProps: any = isEnum
|
||||
? {
|
||||
extensions: [new PieHexExtension(requireEnumPalette(enumPaletteRef.current))],
|
||||
getCenter: (d: HexagonData) => [d.lon, d.lat],
|
||||
getRatios0: (d: HexagonData) => {
|
||||
const r = distToRatios(d[distKey]);
|
||||
return [r[0], r[1], r[2], r[3]];
|
||||
},
|
||||
getRatios1: (d: HexagonData) => {
|
||||
const r = distToRatios(d[distKey]);
|
||||
return [r[4], r[5], r[6], r[7]];
|
||||
},
|
||||
getRatios2: (d: HexagonData) => {
|
||||
const r = distToRatios(d[distKey]);
|
||||
return [r[8], r[9]];
|
||||
},
|
||||
updateTriggers: {
|
||||
getCenter: [colorTrigger, data],
|
||||
getRatios0: [colorTrigger, data],
|
||||
getRatios1: [colorTrigger, data],
|
||||
getRatios2: [colorTrigger, data],
|
||||
},
|
||||
}
|
||||
extensions: [new PieHexExtension(requireEnumPalette(enumPaletteRef.current))],
|
||||
getCenter: (d: HexagonData) => [d.lon, d.lat],
|
||||
getRatios0: (d: HexagonData) => {
|
||||
const r = distToRatios(d[distKey]);
|
||||
return [r[0], r[1], r[2], r[3]];
|
||||
},
|
||||
getRatios1: (d: HexagonData) => {
|
||||
const r = distToRatios(d[distKey]);
|
||||
return [r[4], r[5], r[6], r[7]];
|
||||
},
|
||||
getRatios2: (d: HexagonData) => {
|
||||
const r = distToRatios(d[distKey]);
|
||||
return [r[8], r[9]];
|
||||
},
|
||||
updateTriggers: {
|
||||
getCenter: [colorTrigger, data],
|
||||
getRatios0: [colorTrigger, data],
|
||||
getRatios1: [colorTrigger, data],
|
||||
getRatios2: [colorTrigger, data],
|
||||
},
|
||||
}
|
||||
: {};
|
||||
|
||||
return new H3HexagonLayer<HexagonData>({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@config "../tailwind.config.js";
|
||||
|
||||
@import "tailwindcss";
|
||||
@import 'tailwindcss';
|
||||
|
||||
html,
|
||||
body,
|
||||
|
|
@ -66,7 +66,7 @@ h3 {
|
|||
}
|
||||
|
||||
.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-x: 50%;
|
||||
--home-pointer-y: 50%;
|
||||
|
|
@ -124,7 +124,7 @@ h3 {
|
|||
}
|
||||
|
||||
.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%);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
return POI_FILTER_CONFIGS[filterName];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue