* chore: migration to SvelteKit 2 * stage 1: migrate to svelte 5 and fix rerendering issues * stage 2: fix more $: reactivity across dashboard * fix merge conflicts * chore: migrate code in main to svelte 5 * chore: update preventDefault * chore: simplify tsconfig and remove unused mobileMenuRef in MobileMenu.svelte * chore: enforce .ts across dashboard * rename from classroomio-com to website * stage-3: Replace carbon icon svelte with lucide icon * update lock file * chore: finish icon replacement * fix: settings and setup page multiple rerender * stage 3: More icon and rerendering fixes * feat: setup drizzle and better auth * fix: onboarding validation error showing translation key #586 (#593) * fix: onboarding validation error showing translation key #586 * fix: remove debug log for profile update errors * chore: add a clean command * fix: remove message from email verification response
36 lines
1.1 KiB
Svelte
36 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import type { TCustomLinks } from './types';
|
|
|
|
interface Props {
|
|
customLinks?: TCustomLinks | undefined;
|
|
isMobile?: boolean;
|
|
onMobileClick?: (() => void) | undefined;
|
|
}
|
|
|
|
let { customLinks = undefined, isMobile = false, onMobileClick = undefined }: Props = $props();
|
|
|
|
function handleLinkClick() {
|
|
if (onMobileClick) onMobileClick();
|
|
}
|
|
</script>
|
|
|
|
{#if customLinks}
|
|
<div class={isMobile ? 'space-y-4' : 'mr-4 hidden items-center space-x-6 lg:flex'}>
|
|
{#each customLinks.links as link}
|
|
<li>
|
|
<a
|
|
href={link.url}
|
|
target={link.openInNewTab ? '_blank' : '_self'}
|
|
rel={link.openInNewTab ? 'noopener noreferrer' : ''}
|
|
class={isMobile
|
|
? 'hover:text-primary-600 block rounded-md px-3 py-2 font-medium text-gray-700 transition-colors duration-200 hover:bg-gray-50'
|
|
: 'hover:text-primary-600 rounded-md px-4 py-2 font-medium text-gray-700 no-underline transition-all duration-200 ease-in-out hover:bg-gray-100'}
|
|
onclick={handleLinkClick}
|
|
>
|
|
{link.label}
|
|
</a>
|
|
</li>
|
|
{/each}
|
|
</div>
|
|
{/if}
|