Clear confirmation on recipe selected

This commit is contained in:
MyNameIsBatman 2022-09-20 18:05:32 -03:00
parent 8d076b2b1a
commit 5168eed641

View File

@ -1,5 +1,5 @@
import { CraftingRecipeIngredientParser, RoomObjectCategory } from '@nitrots/nitro-renderer';
import { FC, useMemo, useState } from 'react';
import { FC, useEffect, useMemo, useState } from 'react';
import { GetRoomEngine, IsOwnerOfFurniture, LocalizeText } from '../../../../api';
import { AutoGrid, Button, Column, Flex, LayoutGridItem, LayoutLoadingSpinnerView, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../common';
import { useFurnitureCraftingWidget, useRoom } from '../../../../hooks';
@ -11,6 +11,11 @@ export const FurnitureCraftingView: FC<{}> = props =>
const [ waitingToConfirm, setWaitingToConfirm ] = useState(false);
useEffect(() =>
{
setWaitingToConfirm(false);
}, [ selectedRecipe ]);
const isOwner = useMemo(() =>
{
const roomObject = GetRoomEngine().getRoomObject(roomSession.roomId, objectId, RoomObjectCategory.FLOOR);