From 8ef793320f5a7ff67966c194f33f52a001083b3b Mon Sep 17 00:00:00 2001 From: Christopher Humphries Date: Sat, 14 Jan 2023 14:45:51 +0100 Subject: [PATCH 1/2] fix: move action buttons and site into game header --- app/routes/game.$id.jsx | 131 +++++++++++++++++++++++----------------- 1 file changed, 76 insertions(+), 55 deletions(-) diff --git a/app/routes/game.$id.jsx b/app/routes/game.$id.jsx index e75dea8..ebdc61c 100644 --- a/app/routes/game.$id.jsx +++ b/app/routes/game.$id.jsx @@ -18,18 +18,25 @@ import { useDisclosure, IconButton, Tag, - useColorModeValue, Link as ChakraLink, List, ListItem, chakra, Flex, + Menu, + MenuButton, + MenuList, + MenuItem, + MenuDivider, + useColorModeValue, } from '@chakra-ui/react'; import { AddIcon, DeleteIcon, EditIcon, ExternalLinkIcon, + HamburgerIcon, + TimeIcon, } from '@chakra-ui/icons'; import { json } from '@remix-run/node'; import { Form, Link, useFetcher, useLoaderData } from '@remix-run/react'; @@ -188,34 +195,54 @@ const Game = () => { <> - + {name} + + {site && ( + } + href={site} + isExternal + /> + )} + {currentUser && ( - <> - - Changes History - - - + + } + variant="outline" + ml={2} + /> + + } + href={`/game/${id}/edit`} + > + Edit + + } + href={`/game/${id}/changes`} + > + History + + + } + onClick={deleteModal.onOpen} + > + Delete + + + )} - {site && ( - - - {site.replace(/https?:\/\//, '')} - - - - )} {about && ( @@ -459,37 +486,31 @@ const Game = () => { )} {currentUser && ( - - - - - - - Delete Game - - - Do you really want to delete {name}? - - - - - - - - - + + + + Delete Game + + + Do you really want to delete {name}? + + + + + + + + )} ); From c05cdb4d9eb29af7a23abd5518b8f23b8ed0f4ca Mon Sep 17 00:00:00 2001 From: Christopher Humphries Date: Sat, 14 Jan 2023 14:56:59 +0100 Subject: [PATCH 2/2] fix: improve copy layout --- app/routes/game.$id.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/routes/game.$id.jsx b/app/routes/game.$id.jsx index ebdc61c..bae69c4 100644 --- a/app/routes/game.$id.jsx +++ b/app/routes/game.$id.jsx @@ -193,9 +193,16 @@ const Game = () => { return ( <> - + - + {name} @@ -245,7 +252,7 @@ const Game = () => { {about && ( - + )}