Finished user-screen

This commit is contained in:
Mawoka
2023-01-26 19:18:56 +01:00
parent 8d544d7c88
commit 028ab567de
3 changed files with 21 additions and 7 deletions
+3 -3
View File
@@ -4,9 +4,9 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import type { PageLoad } from './$types';
// import type { PageLoad } from './$types';
export const load = (async ({ params, fetch }) => {
export const load = async ({ params, fetch }) => {
const user_req = await fetch(`/api/v1/community/user/${params.user_id}`);
const user = await user_req.json();
if (!user) {
@@ -21,4 +21,4 @@ export const load = (async ({ params, fetch }) => {
user,
quizzes
};
}) satisfies PageLoad;
}; // satisfies PageLoad;
@@ -68,6 +68,9 @@
<div class="text-center">
<p>{@html quiz.description}</p>
</div>
<p class="text-center">
Made by <a href="/user/{quiz.user_id.id}" class="underline">@{quiz.user_id.username}</a>
</p>
{#if quiz.cover_image}
<div class="flex justify-center align-middle items-center">
<div class="h-[15vh] m-auto w-auto my-3">