First attempt at mobile selection box for mod queue

This commit is contained in:
regalijan 2023-10-19 16:51:00 -04:00
parent a14c0724e1
commit 8786363601
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -264,6 +264,24 @@ export default function () {
itemModals[modal].onOpen(); itemModals[modal].onOpen();
}, []); }, []);
const ItemDisplay = (
<Select
onChange={async (v) => {
setEntries([]);
setBefore(Date.now());
const { target } = v;
await updateQueue(
target.options[target.selectedIndex].value,
Date.now(),
);
}}
>
{entryTypes}
</Select>
);
return ( return (
<Container maxW="container.lg"> <Container maxW="container.lg">
<NewGameBan <NewGameBan
@ -281,24 +299,13 @@ export default function () {
/> />
<Flex> <Flex>
<VStack w={isDesktop ? "container.md" : "container.lg"}> <VStack w={isDesktop ? "container.md" : "container.lg"}>
<Box display={isDesktop ? "none" : undefined} mb="16px">
{ItemDisplay}
</Box>
{entries} {entries}
</VStack> </VStack>
<Box display={isDesktop ? undefined : "none"} ml="16px" w="248px"> <Box display={isDesktop ? undefined : "none"} ml="16px" w="248px">
<Select {ItemDisplay}
onChange={async (v) => {
setEntries([]);
setBefore(Date.now());
const { target } = v;
await updateQueue(
target.options[target.selectedIndex].value,
Date.now(),
);
}}
>
{entryTypes}
</Select>
</Box> </Box>
</Flex> </Flex>
<Popover placement="top-end"> <Popover placement="top-end">