diff --git a/src/app/dashboard/index.tsx b/src/app/dashboard/index.tsx index efc12c8..a62bea9 100644 --- a/src/app/dashboard/index.tsx +++ b/src/app/dashboard/index.tsx @@ -1,22 +1,8 @@ -import { - Bold, - Button, - Card, - Col, - Flex, - Grid, - List, - ListItem, - Metric, - Text, - Title, -} from "@tremor/react"; +import { Bold, Button, Card, Flex, Grid, Metric, Text } from "@tremor/react"; import { CheckCircleIcon, QuestionMarkCircleIcon, StopIcon, - UserGroupIcon, - UserIcon, } from "@heroicons/react/20/solid"; import { ProgressBar, @@ -26,18 +12,17 @@ import { TabPanel, TabPanels, } from "@tremor/react"; -import { RenderQuestion, useQuestions } from "../questions/list"; import { LayoutPageProps } from "../layout"; -import { QuestionAnswer } from "../questions/interfaces"; import QuestionsError from "./questions.error"; import React from "react"; -import { TabExample } from "./tabs"; -import { isEmpty } from "lodash"; -import { useAppState } from "../hooks"; +import { useQuestions } from "../questions/list"; export const Dashboard = ({ state }: LayoutPageProps) => { const { + apps = [], + completedApps = [], + skippedApps = [], isListRunning, isAppRunning, jobs = [], @@ -163,10 +148,15 @@ export const Dashboard = ({ state }: LayoutPageProps) => { - Questions: error ({errorQuestions.length}) + Questions: error {errorQuestions.length && errorQuestions.length} + + + Applications: skipped {skippedApps.length && skippedApps.length} + + + Applications: completed{" "} + {completedApps.length && completedApps.length} - Applications: skipped - Applications: completed diff --git a/src/app/hooks.tsx b/src/app/hooks.tsx index 61054c7..44e7499 100644 --- a/src/app/hooks.tsx +++ b/src/app/hooks.tsx @@ -4,6 +4,9 @@ import { BEState } from "../utils/state"; export const useAppState = (): BEState => { const [state, setState] = React.useState({ + apps: [], + completedApps: [], + skippedApps: [], count: 0, jobs: [], applied: [], diff --git a/src/index.ts b/src/index.ts index 79d422d..6cce99c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -202,6 +202,7 @@ async function runApplying(): Promise { if (firstJob) { await setState({ ...state, activeJob: firstJob }); await gotoAppPage(firstJob); + await new Promise((resolve, reject) => { setTimeout(() => { resolve(true);