fix(join-group): redirect unauthenticated users to login + docs update
- JoinGroupPage: redirect to login when user is not authenticated - CLAUDE.md: add env details, path alias, and coding constraints Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,7 @@ const error = ref('')
|
||||
|
||||
const groupId = route.params.groupId as string
|
||||
|
||||
onMounted(async () => {
|
||||
async function loadGroup() {
|
||||
try {
|
||||
group.value = await getGroup(groupId)
|
||||
} catch {
|
||||
@@ -27,6 +27,14 @@ onMounted(async () => {
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if (!isAuthenticated()) {
|
||||
router.replace({ name: 'Login', query: { redirect: route.fullPath } })
|
||||
return
|
||||
}
|
||||
await loadGroup()
|
||||
})
|
||||
|
||||
function goToLogin() {
|
||||
|
||||
Reference in New Issue
Block a user