Files
stats/apps/dashboard/src/app/(onboarding)/skip-onboarding.tsx
Carl-Gerhard Lindesvärd 3a9fcf4915 do not prefetch
2024-04-18 09:18:00 +02:00

23 lines
509 B
TypeScript

'use client';
import { ChevronLastIcon } from 'lucide-react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
const SkipOnboarding = () => {
const pathname = usePathname();
if (!pathname.startsWith('/onboarding')) return null;
return (
<Link
prefetch={false}
href="/"
className="flex items-center gap-2 text-sm text-muted-foreground"
>
Skip onboarding
<ChevronLastIcon size={16} />
</Link>
);
};
export default SkipOnboarding;