+ {status === 404 ? 'Team Not Found' : 'Something went wrong'}
+
+ {status === 404
+ ? 'We could not find a team with that code.'
+ : (error?.message || 'Please try again later.')}
+
+
+
+
+
diff --git a/src/routes/teams/[shortcode]/+page.server.ts b/src/routes/teams/[shortcode]/+page.server.ts
new file mode 100644
index 00000000..4b007774
--- /dev/null
+++ b/src/routes/teams/[shortcode]/+page.server.ts
@@ -0,0 +1,34 @@
+import type { PageServerLoad } from './$types'
+import { error } from '@sveltejs/kit'
+import { PartyService } from '$lib/services/party.service'
+
+export const load: PageServerLoad = async ({ fetch, params, parent }) => {
+ const { shortcode } = params
+ const partyService = new PartyService(fetch)
+
+ try {
+ const party = await partyService.getByShortcode(shortcode)
+
+ const parentData = await parent()
+ const authUserId = (parentData as any)?.user?.id
+
+ const canEditServer = partyService.computeEditability(
+ party,
+ authUserId,
+ undefined,
+ undefined
+ )
+
+ return {
+ party,
+ canEditServer: canEditServer.canEdit,
+ authUserId
+ }
+ } catch (err: any) {
+ console.error('Error loading party:', err)
+ if (err?.issues) console.error('Validation errors:', err.issues)
+ if (err.status === 404) throw error(404, 'Team not found')
+ throw error(err.status || 500, err.message || 'Failed to load team')
+ }
+}
+
diff --git a/src/routes/teams/[shortcode]/+page.svelte b/src/routes/teams/[shortcode]/+page.svelte
new file mode 100644
index 00000000..5ac5cc77
--- /dev/null
+++ b/src/routes/teams/[shortcode]/+page.svelte
@@ -0,0 +1,13 @@
+
+
+