Lint & small changes

This commit is contained in:
Andras Schmelczer 2026-04-04 22:59:07 +01:00
parent 0c6d207967
commit 55238f59aa
21 changed files with 2522 additions and 423 deletions

View file

@ -8,14 +8,54 @@ const STORAGE_KEY = 'tutorial_completed';
export function useTutorial(initialLoading: boolean, isMobile: boolean, blocked = false) {
const { t } = useTranslation();
const steps: Step[] = useMemo(() => [
{ target: '[data-tutorial="filters"]', title: t('tutorial.step1Title'), content: t('tutorial.step1Content'), placement: 'right' as const, disableBeacon: true },
{ target: '[data-tutorial="ai-filters"]', title: t('tutorial.step2Title'), content: t('tutorial.step2Content'), placement: 'right' as const, disableBeacon: true },
{ target: '[data-tutorial="map"]', title: t('tutorial.step3Title'), content: t('tutorial.step3Content'), placement: 'bottom' as const, disableBeacon: true },
{ target: '[data-tutorial="search"]', title: t('tutorial.step4Title'), content: t('tutorial.step4Content'), placement: 'bottom' as const, disableBeacon: true },
{ target: '[data-tutorial="right-pane"]', title: t('tutorial.step5Title'), content: t('tutorial.step5Content'), placement: 'left' as const, disableBeacon: true },
{ target: '[data-tutorial="poi-button"]', title: t('tutorial.step6Title'), content: t('tutorial.step6Content'), placement: 'left' as const, disableBeacon: true, styles: { tooltip: { transform: 'translateY(-50px)' } } },
], [t]);
const steps: Step[] = useMemo(
() => [
{
target: '[data-tutorial="filters"]',
title: t('tutorial.step1Title'),
content: t('tutorial.step1Content'),
placement: 'right' as const,
disableBeacon: true,
},
{
target: '[data-tutorial="ai-filters"]',
title: t('tutorial.step2Title'),
content: t('tutorial.step2Content'),
placement: 'right' as const,
disableBeacon: true,
},
{
target: '[data-tutorial="map"]',
title: t('tutorial.step3Title'),
content: t('tutorial.step3Content'),
placement: 'bottom' as const,
disableBeacon: true,
},
{
target: '[data-tutorial="search"]',
title: t('tutorial.step4Title'),
content: t('tutorial.step4Content'),
placement: 'bottom' as const,
disableBeacon: true,
},
{
target: '[data-tutorial="right-pane"]',
title: t('tutorial.step5Title'),
content: t('tutorial.step5Content'),
placement: 'left' as const,
disableBeacon: true,
},
{
target: '[data-tutorial="poi-button"]',
title: t('tutorial.step6Title'),
content: t('tutorial.step6Content'),
placement: 'left' as const,
disableBeacon: true,
styles: { tooltip: { transform: 'translateY(-50px)' } },
},
],
[t]
);
const [run, setRun] = useState(() => {
if (isMobile) return false;
@ -50,6 +90,6 @@ export function useTutorial(initialLoading: boolean, isMobile: boolean, blocked
handleCallback,
resetTutorial,
}),
[shouldRun, handleCallback, resetTutorial]
[steps, shouldRun, handleCallback, resetTutorial]
);
}