fix(onboarding): fix widget links, isComplete logic, and event slugs
Some checks failed
Test / vitest (push) Successful in 10m44s
Test / playwright (push) Failing after 9m15s
Test / visual (push) Failing after 9m7s
Test / Notify on failure (push) Successful in 2s

Use dynamic href for external links, check completedAt for graduation,
link events by slug instead of _id, and remove stale click handler.
This commit is contained in:
Jennie Robinson Faber 2026-04-09 23:52:04 +01:00
parent 50a358b294
commit e791a0d480
3 changed files with 8 additions and 8 deletions

View file

@ -22,10 +22,11 @@ export function useOnboarding(options = {}) {
const _fetched = useState('onboarding._fetched', () => false)
const isComplete = computed(() =>
goals.value.hasProfileTags &&
!!completedAt.value ||
(goals.value.hasProfileTags &&
goals.value.hasVisitedEvent &&
goals.value.hasEngagedEcology &&
goals.value.hasClickedWiki
goals.value.hasClickedWiki)
)
const pickCategory = options.pickCategory || ((categories) => {
@ -63,7 +64,7 @@ export function useOnboarding(options = {}) {
return {
key: 'wiki',
text: 'Browse the wiki for resources and guides',
action: null,
action: 'https://wiki.ghostguild.org',
actionText: 'Browse wiki',
isExternal: true,
}
@ -101,7 +102,7 @@ export function useOnboarding(options = {}) {
return {
key: 'event',
text: `Upcoming event: ${item.title}`,
action: `/events/${item._id}`,
action: `/events/${item.slug}`,
actionText: 'View event',
}
}
@ -139,7 +140,7 @@ export function useOnboarding(options = {}) {
_fetched.value = true
// If graduated, fetch recommendations
if (isComplete.value) {
if (completedAt.value) {
await fetchRecommendations()
}
} catch {