From ff5494402428db93e7574902cab2927c76352782 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Wed, 24 Sep 2025 17:00:53 +0800 Subject: [PATCH] Cleanup --- src/pages/IndexPage/Index.sass | 1 - src/pages/IndexPage/Index.tsx | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pages/IndexPage/Index.sass b/src/pages/IndexPage/Index.sass index 003a53a..cc97bcc 100644 --- a/src/pages/IndexPage/Index.sass +++ b/src/pages/IndexPage/Index.sass @@ -2,7 +2,6 @@ @use '/src/styles/breakpoint.sass' as views h1 - font-size: 3.25rem color: vars.$textColor @media only screen and (max-width: views.$mobile) diff --git a/src/pages/IndexPage/Index.tsx b/src/pages/IndexPage/Index.tsx index 2f6b9ed..2e1f1ff 100644 --- a/src/pages/IndexPage/Index.tsx +++ b/src/pages/IndexPage/Index.tsx @@ -1,7 +1,26 @@ import './Index.sass' import { Button, Page, Padding, Display, Row, Logo, Column, Box } from '../../components' +import { onMount } from 'solid-js' +import { ofetch } from 'ofetch' + +const API = 'http://localhost:4320/api/' +let assessorsNameList: string[] export default () => { + const getAssessors = async () => { + try { + const assessors = await ofetch(API + 'get-list-assessors', { parseResponse: JSON.parse }) + assessorsNameList = [...assessors.result2] + } catch (error) { + console.error(error) + } + sessionStorage.setItem('assessors', JSON.stringify([...assessorsNameList])) + } + + onMount(async () => { + await getAssessors() + }) + return ( <>