add test to checkout

This commit is contained in:
2025-12-16 22:25:34 -03:00
parent 086d3adcaf
commit b767aaaefd
13 changed files with 206 additions and 14 deletions

View File

@@ -41,10 +41,10 @@ export async function loader({ params, context, request }: Route.ActionArgs) {
}
const { items = [] } = (await r.json()) as { items: { sk: string }[] }
const orgs = items.map(({ sk, ...props }) => ({
...props,
id: sk?.split('#')[1] ?? null
}))
const orgs = items.map(({ sk, ...props }) => {
const [, id] = sk?.split('#')
return { ...props, id }
})
const exists = orgs.some(({ id }) => id === params.orgid)
if (exists) {