import React from "react"; import {Modal} from "react-bootstrap"; import {useShopStore} from "./shop_store"; import {useClickAway} from "./options/useClickAway"; export function ShowJSON() { const {shouldShow, description, showDescription, closeDescription} = useShopStore(state => ({ shouldShow: state.shouldShowDescription, description: state.description, closeDescription: state.closeDescription, showDescription: state.showDescription, })); const ref = useClickAway((e) => { if (e.type === "mousedown") // ignore touchstart closeDescription() } ); return (<>