2022-12-05 20:14:56 +00:00
|
|
|
import { component$ } from '@builder.io/qwik'
|
2023-01-12 15:39:03 +00:00
|
|
|
import { loader$ } from '@builder.io/qwik-city'
|
2023-02-01 14:24:44 +00:00
|
|
|
import { getNotFoundHtml } from '~/utils/getNotFoundHtml/getNotFoundHtml'
|
2023-01-12 15:39:03 +00:00
|
|
|
|
2023-02-01 14:24:44 +00:00
|
|
|
export const accountLoader = loader$(({ request, html }) => {
|
2023-01-12 15:39:03 +00:00
|
|
|
const params = new URL(request.url).searchParams
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
const accountId = params.get('accountId')
|
|
|
|
|
2023-02-01 14:24:44 +00:00
|
|
|
html(404, getNotFoundHtml())
|
2023-01-12 15:39:03 +00:00
|
|
|
|
|
|
|
// TODO: retrieve the account details from the backend
|
|
|
|
const accountDetails = null
|
|
|
|
|
|
|
|
return accountDetails
|
|
|
|
})
|
2022-12-05 20:14:56 +00:00
|
|
|
|
|
|
|
export default component$(() => {
|
2023-01-12 15:39:03 +00:00
|
|
|
const accountDetails = accountLoader.use()
|
2022-12-05 20:14:56 +00:00
|
|
|
|
2023-01-12 15:39:03 +00:00
|
|
|
// TODO: Implement the account view
|
|
|
|
return <>{accountDetails.value && <div>account details</div>}</>
|
2022-12-05 20:14:56 +00:00
|
|
|
})
|