From 8487d9674a027d8227c6deeae5d631a222148600 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 29 Mar 2021 19:50:34 -0700 Subject: [PATCH] Only show Save if logged in --- src/app/WardrobePage/ItemsPanel.js | 42 ++++++++++++++++++------------ 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/app/WardrobePage/ItemsPanel.js b/src/app/WardrobePage/ItemsPanel.js index 17d72c7..1ffb1d3 100644 --- a/src/app/WardrobePage/ItemsPanel.js +++ b/src/app/WardrobePage/ItemsPanel.js @@ -25,6 +25,7 @@ import Item, { ItemListContainer, ItemListSkeleton } from "./Item"; import { BiRename } from "react-icons/bi"; import { IoCloudUploadOutline } from "react-icons/io5"; import { MdMoreVert } from "react-icons/md"; +import useCurrentUser from "../components/useCurrentUser"; /** * ItemsPanel shows the items in the current outfit, and lets the user toggle @@ -250,6 +251,8 @@ function ItemZoneGroupSkeleton({ itemCount }) { * It also contains the outfit menu, for saving etc. */ function OutfitHeading({ outfitState, dispatchToOutfit }) { + const { isLoggedIn } = useCurrentUser(); + return ( // The Editable wraps everything, including the menu, because the menu has // a Rename option. @@ -274,24 +277,29 @@ function OutfitHeading({ outfitState, dispatchToOutfit }) { - - - - + Save + + + + + )} +