Skip to content

Commit 543e0c9

Browse files
committed
Fix type assertion
1 parent 4f86b66 commit 543e0c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/src/routes/(root)/(logged)/tutorials/+page.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
} from '$lib/tutorialUtils'
2222
import { Button } from '$lib/components/common'
2323
import { RefreshCw, CheckCheck, CheckCircle2, Circle, Shield, Code, UserCog } from 'lucide-svelte'
24-
import { TUTORIALS_CONFIG, type TabId } from '$lib/tutorials/config'
24+
import { TUTORIALS_CONFIG, type TabId, type TabConfig } from '$lib/tutorials/config'
2525
import { userStore } from '$lib/stores'
2626
import ToggleButtonGroup from '$lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte'
2727
import ToggleButton from '$lib/components/common/toggleButton-v2/ToggleButton.svelte'
@@ -77,12 +77,12 @@
7777
7878
// Get active tabs only (filtered by active and roles)
7979
const activeTabs = $derived.by(() => {
80-
return Object.entries(TUTORIALS_CONFIG).filter(([, config]) => {
80+
return (Object.entries(TUTORIALS_CONFIG) as [TabId, TabConfig][]).filter(([, config]) => {
8181
// Filter by active
8282
if (config.active === false) return false
8383
// Filter by roles
8484
return checkAccess(config.roles)
85-
}) as [TabId, typeof TUTORIALS_CONFIG[TabId]][]
85+
})
8686
})
8787
8888
// Initialize tab to first active tab (already filtered by role and active status)

0 commit comments

Comments
 (0)