From 1402a7a156ee3e8664646d125c10c581df0a4562 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Fri, 3 May 2024 10:37:49 +0200 Subject: [PATCH] color fix --- src/Components/Profile/ActionsButton.tsx | 11 +++++++---- src/Components/Profile/OverlayItemProfile.tsx | 4 +--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Components/Profile/ActionsButton.tsx b/src/Components/Profile/ActionsButton.tsx index d2297fd8..2650b3e5 100644 --- a/src/Components/Profile/ActionsButton.tsx +++ b/src/Components/Profile/ActionsButton.tsx @@ -5,19 +5,22 @@ import { useItems } from "../Map/hooks/useItems"; import { HeaderView } from "../Map/Subcomponents/ItemPopupComponents/HeaderView"; import { Item } from "../../types"; import { TextInput } from "../Input"; +import { getValue } from "../../Utils/GetValue"; +import { useGetItemTags } from "../Map/hooks/useTags"; -export function ActionButton({ item, triggerAddButton, triggerItemSelected, existingRelations, itemType, color, collection = "items" }: { +export function ActionButton({ item, triggerAddButton, triggerItemSelected, existingRelations, itemType, colorField, collection = "items" }: { triggerAddButton?: any, triggerItemSelected?: any, existingRelations: Item[], itemType?: string; - color: string, + colorField?: string, collection?: string, item: Item }) { const hasUserPermission = useHasUserPermission(); const [modalOpen, setModalOpen] = useState(false); const [search, setSearch] = useState(""); + const getItemTags = useGetItemTags(); const items = useItems(); @@ -30,11 +33,11 @@ export function ActionButton({ item, triggerAddButton, triggerItemSelected, exis <>{hasUserPermission(collection, "update", item) && <>
- {triggerItemSelected && } - {triggerAddButton &&