From f560bad2888b1f112dd604c48c41946bad02ba6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romaric=20Philog=C3=A8ne?= Date: Sat, 6 Jan 2024 19:16:25 +0100 Subject: [PATCH] wip(frontend): refactor SelfService inner components into multiple components --- .../components/self-service/SelfService.tsx | 56 ++---------------- .../self-service/SelfServiceTabRun.tsx | 15 +++++ .../self-service/SelfServiceTabService.tsx | 59 +++++++++++++++++++ 3 files changed, 78 insertions(+), 52 deletions(-) create mode 100644 frontend/src/components/self-service/SelfServiceTabRun.tsx create mode 100644 frontend/src/components/self-service/SelfServiceTabService.tsx diff --git a/frontend/src/components/self-service/SelfService.tsx b/frontend/src/components/self-service/SelfService.tsx index 9d37770..d641345 100644 --- a/frontend/src/components/self-service/SelfService.tsx +++ b/frontend/src/components/self-service/SelfService.tsx @@ -1,11 +1,7 @@ -import EmptyState from "@/components/common/EmptyState.tsx"; -import SelfServiceCard from "@/components/self-service/SelfServiceCard.tsx"; -import {TargetIcon} from "lucide-react"; -import SelfServiceSlideOver from "@/components/self-service/SelfServiceSlideOver.tsx"; import {useState} from "react"; -import {Transition} from "@headlessui/react"; -import {TrashIcon} from "@heroicons/react/24/outline"; import {classNames} from "@/lib/utils.ts"; +import SelfServiceTabService from "@/components/self-service/SelfServiceTabService.tsx"; +import SelfServiceTabRun from "@/components/self-service/SelfServiceTabRun.tsx"; const tabs = [ {name: 'Services', href: '#', current: true}, @@ -17,20 +13,9 @@ interface Props { services: any[] } -function getIcon(icon?: string): JSX.Element { - switch (icon?.toLowerCase()) { - case 'target': - return