Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make group responsive #644

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions apps/dashboard/src/pages/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import {
useClipboard,
useDisclosure,
useToast,
VStack
VStack,
Stack
} from "@chakra-ui/react"
import { useCallback, useEffect, useState, useContext } from "react"
import { CgProfile } from "react-icons/cg"
Expand Down Expand Up @@ -400,9 +401,23 @@ ${memberIds.join("\n")}
)}
</VStack>

<HStack mt="30px" align="start" spacing="14">
<VStack flex="1" align="stretch" spacing="6">
<HStack flex="1" spacing="4">
<Stack
mt="30px"
align="start"
spacing="2"
yagopajarino marked this conversation as resolved.
Show resolved Hide resolved
direction={{ base: "column-reverse", md: "row" }}
>
<VStack
flex="1"
align="stretch"
spacing="6"
width={{ base: "100%", md: "auto" }}
>
<Stack
flex="1"
spacing="4"
direction={{ base: "column", md: "row" }}
>
<Box
flex="1"
bgColor="balticSea.50"
Expand Down Expand Up @@ -448,7 +463,7 @@ ${memberIds.join("\n")}
{_group.treeDepth}
</Heading>
</Box>
</HStack>
</Stack>
(
<Box
bgColor="balticSea.50"
Expand Down Expand Up @@ -742,8 +757,9 @@ ${memberIds.join("\n")}
borderColor="classicRose.200"
borderWidth="1px"
borderRadius="8px"
width={{ base: "100%", md: "auto" }}
>
<HStack justify="space-between">
<Stack justify="space-between" direction={{base:"column", lg: "row"}}>
<Heading fontSize="25px" as="h1">
Members
</Heading>
Expand All @@ -755,7 +771,7 @@ ${memberIds.join("\n")}
>
Add member
</Button>
</HStack>
</Stack>

<HStack mt="30px" mb="20px">
<InputGroup w="100%">
Expand Down Expand Up @@ -864,19 +880,26 @@ ${memberIds.join("\n")}
))
)}
{_group.type === "off-chain" && isGroupAdmin && (
<Flex mt="20px" justify="space-between" align="center">
<ButtonGroup>
<Flex
mt="20px"
justify="space-between"
align="center"
direction={{ base: "column", lg: "row" }}
>
<ButtonGroup width={{ base: "100%", lg: "auto" }}>
<Button
variant="solid"
colorScheme="tertiary"
onClick={handleSelectAll}
width={{ base: "50%", lg: "auto" }}
>
Select All
</Button>
<Button
variant="solid"
colorScheme="tertiary"
onClick={handleDeselectAll}
width={{ base: "50%", lg: "auto" }}
>
Deselect
</Button>
Expand All @@ -886,14 +909,15 @@ ${memberIds.join("\n")}
colorScheme="danger"
isDisabled={_selectedMembers.length === 0}
onClick={() => removeMembers(_selectedMembers)}
size="sm"
width={{ base: "100%", lg: "auto" }}
mt={{ base: "1rem", lg: "0" }}
>
Remove Selected Members
</Button>
</Flex>
)}
</Box>
</HStack>
</Stack>

<AddMemberModal
isOpen={addMembersModal.isOpen}
Expand Down