Fix routing to order on bookpage floating maker form

This commit is contained in:
Reckless_Satoshi 2023-04-29 07:14:23 -07:00
parent 4adde72fd5
commit 0e17121999
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -13,7 +13,7 @@ import { BarChart, FormatListBulleted } from '@mui/icons-material';
import { AppContext, UseAppStoreType } from '../../contexts/AppContext'; import { AppContext, UseAppStoreType } from '../../contexts/AppContext';
const BookPage = (): JSX.Element => { const BookPage = (): JSX.Element => {
const { robot, fetchBook, windowSize, book, setDelay, setOrder } = const { robot, fetchBook, windowSize, setDelay, setOrder } =
useContext<UseAppStoreType>(AppContext); useContext<UseAppStoreType>(AppContext);
const { t } = useTranslation(); const { t } = useTranslation();
const navigate = useNavigate(); const navigate = useNavigate();
@ -82,7 +82,6 @@ const BookPage = (): JSX.Element => {
<MakerForm <MakerForm
hasRobot={robot.avatarLoaded} hasRobot={robot.avatarLoaded}
onOrderCreated={(id) => { onOrderCreated={(id) => {
setPage('order');
navigate('/order/' + id); navigate('/order/' + id);
}} }}
/> />