From 5714a7f7d1dc09983e0f9fd685577a18bcb5c6e6 Mon Sep 17 00:00:00 2001 From: dkars2s <83016247+dkars2s@users.noreply.github.com> Date: Tue, 20 Dec 2022 16:22:57 +0100 Subject: [PATCH] impl. function to show cloesd tasks ratings + accept finalValue from sockets --- .../Session/Tasks/Components/TaskCard.tsx | 33 +++++++++++++++++-- .../Session/Tasks/Stores/TaskStore.ts | 9 +++-- client/pages/session/[id].tsx | 13 ++++++-- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/client/app/Components/Features/Session/Tasks/Components/TaskCard.tsx b/client/app/Components/Features/Session/Tasks/Components/TaskCard.tsx index 047733c..3624463 100644 --- a/client/app/Components/Features/Session/Tasks/Components/TaskCard.tsx +++ b/client/app/Components/Features/Session/Tasks/Components/TaskCard.tsx @@ -1,5 +1,5 @@ import axios from "axios"; -import { FunctionComponent } from "react"; +import { FunctionComponent, useState } from "react"; import { Status, convertStatusToNumber, @@ -10,6 +10,7 @@ import { import { useTaskStore } from "../Stores/TaskStore"; import { baseUrl, serviceUrl } from "../../../../../Constants/url"; + export const TaskCard: FunctionComponent<{ id: String; parentSession: String; @@ -80,8 +81,14 @@ export const TaskCard: FunctionComponent<{ ); case Status.Ended: + + return ( + + renderFinalValueOnClosedTasks() + + ); default: - return <>; + return <> } })()}