feat: lint codebase and run precommit hook

This commit is contained in:
Rotimi Best
2025-12-25 09:01:51 +00:00
parent 334c67f22a
commit b31ccf3037
214 changed files with 6191 additions and 2880 deletions
@@ -43,29 +43,29 @@
</Dialog.Title>
</Dialog.Header>
<div class="my-10 flex w-full flex-col items-center">
<h1 class="text-center text-lg dark:text-white">
{#if $deleteModal.isQuestion}
{$t('components.quiz.delete_question')}
{:else}
{$t('components.quiz.delete_quiz')}
{/if}
{$t('components.quiz.lose_content')}
</h1>
<h1 class="text-center text-lg dark:text-white">
{#if $deleteModal.isQuestion}
{$t('components.quiz.delete_question')}
{:else}
{$t('components.quiz.delete_quiz')}
{/if}
{$t('components.quiz.lose_content')}
</h1>
<div class="mt-5">
<Button
onclick={() => {
if ($deleteModal.isQuestion) {
onDelete();
$deleteModal.open = false;
} else {
deleteQuiz();
}
}}
>
{$t('components.quiz.delete')}
</Button>
<div class="mt-5">
<Button
onclick={() => {
if ($deleteModal.isQuestion) {
onDelete();
$deleteModal.open = false;
} else {
deleteQuiz();
}
}}
>
{$t('components.quiz.delete')}
</Button>
</div>
</div>
</div>
</Dialog.Content>
</Dialog.Root>
@@ -114,28 +114,27 @@
<Dialog.Content class="w-4/5 md:w-2/5">
<Dialog.Header>
<Dialog.Title>
{$createQuizModal.openEdit ? $t('components.quiz.update') : $t('components.quiz.create')} {$t(
'components.quiz.a_quiz'
)}
{$createQuizModal.openEdit ? $t('components.quiz.update') : $t('components.quiz.create')}
{$t('components.quiz.a_quiz')}
</Dialog.Title>
</Dialog.Header>
<form onsubmit={preventDefault(createQuiz)}>
<InputField
label={$t('components.quiz.quiz_title')}
bind:value={$createQuizModal.title}
autofocus={true}
placeholder={$t('components.quiz.placehoolder')}
className="mb-4"
isRequired={true}
errorMessage={errors.title}
autoComplete={false}
/>
<InputField
label={$t('components.quiz.quiz_title')}
bind:value={$createQuizModal.title}
autofocus={true}
placeholder={$t('components.quiz.placehoolder')}
className="mb-4"
isRequired={true}
errorMessage={errors.title}
autoComplete={false}
/>
<div class="mt-5 flex items-center justify-end">
<Button type="submit" disabled={isLoading} loading={isLoading}>
{$createQuizModal.openEdit ? $t('components.quiz.save') : $t('components.quiz.continue')}
</Button>
</div>
</form>
<div class="mt-5 flex items-center justify-end">
<Button type="submit" disabled={isLoading} loading={isLoading}>
{$createQuizModal.openEdit ? $t('components.quiz.save') : $t('components.quiz.continue')}
</Button>
</div>
</form>
</Dialog.Content>
</Dialog.Root>
@@ -53,10 +53,7 @@
errorMessage={optionHasError(option.id, currentError.options) && $t('components.quiz.label')}
/>
<div class="absolute right-2 top-2 flex justify-end">
<IconButton
onclick={() => (option.isCorrect = !option.isCorrect)}
class={option.isCorrect ? 'success' : ''}
>
<IconButton onclick={() => (option.isCorrect = !option.isCorrect)} class={option.isCorrect ? 'success' : ''}>
<CircleCheckIcon size={16} filled={option.isCorrect} />
</IconButton>
</div>