import React, {useEffect} from 'react'; import {DragDropContext} from "@hello-pangea/dnd"; import {Layout} from "./Layout.jsx"; import {Backlog} from "./Backlog.jsx"; import {OrderPanel} from "./OrderPanel.jsx"; import {useShopStore} from "./shop_store"; /** * Component that render the entire shop */ export function Shop() { const {addCardFromBacklog, moveCard, deleteCard, cardIndexById} = useShopStore(state => ({ addCardFromBacklog: state.addCardFromBacklog, moveCard: state.moveCard, deleteCard: state.deleteCard, cardIndexById: state.cardIndexById })); const handleOnDragEnd = (drop_result, provided) => { if (drop_result.source.droppableId === "backlog") addCardFromBacklog(drop_result.destination.droppableId, drop_result.source.index, drop_result.destination.index); else if(drop_result.destination.droppableId === "backlog") deleteCard(drop_result.destination.droppableId, drop_result.destination.index); else moveCard(drop_result.source.droppableId, drop_result.source.index, drop_result.destination.droppableId, drop_result.destination.index) } useEffect(() => { addCardFromBacklog(null, [cardIndexById("kasli"), cardIndexById("eem_pwr_mod")], -1); }, []); return ( } main={( Drag and drop the cards you want into the crate below to see how the combination would look like. Setup card's configuration by tapping at the top of the card, most of the options can be modified after shipment. If you have any issues with this ordering system, or if you need other configurations, email us directly anytime at sales@m-labs.hk. The price is estimated and must be confirmed by a quote.

)} /> )}>
); }