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

AdminID #598

Merged
merged 7 commits into from
Nov 1, 2024
Merged
Changes from 3 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: 45 additions & 1 deletion apps/dashboard/src/pages/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ export default function GroupPage(): JSX.Element {
const addMembersModal = useDisclosure()
const toast = useToast()
const { groupId, groupType } = useParams()
const {adminId, adminType } = useParams()
const [_group, setGroup] = useState<Group | null>()
// const { hasCopied, setValue: setApiKey, onCopy } = useClipboard("")
const { hasCopied: hasCopiedGroupId, onCopy: onCopyGroupId } = useClipboard(
groupId || ""
)
const { hasCopied: hasCopiedAdminId, onCopy: onCopyAdminId } = useClipboard(
adminId || ""
)
vplasencia marked this conversation as resolved.
Show resolved Hide resolved
const [_searchMember, setSearchMember] = useState<string>("")
const [_removeGroupName, setRemoveGroupName] = useState<string>("")
const [_selectedMembers, setSelectedMembers] = useState<string[]>([])
Expand All @@ -71,7 +75,7 @@ export default function GroupPage(): JSX.Element {
const { data: signer } = useSigner()

useEffect(() => {
;(async () => {
; (async () => {
if (groupId) {
const group =
groupType === "on-chain"
Expand Down Expand Up @@ -487,6 +491,46 @@ ${memberIds.join("\n")}
</InputRightElement>
</InputGroup>
</Box>
<Box
bgColor="balticSea.50"
p="25px 30px 25px 30px"
borderRadius="8px"
>
<Text fontSize="20px">Admin ID</Text>

<InputGroup size="lg" mt="10px">
<Input
pr="50px"
placeholder="Admin ID"
value={adminId}
vplasencia marked this conversation as resolved.
Show resolved Hide resolved
isDisabled
/>

<InputRightElement mr="5px">
<Tooltip
label={
hasCopiedAdminId ? "Copied!" : "Copy"
}
closeOnClick={false}
hasArrow
>
<IconButton
variant="link"
aria-label="Copy Group id"
onClick={onCopyAdminId}
onMouseDown={(e) => e.preventDefault()}
icon={
<Icon
color="sunsetOrange.600"
boxSize="5"
as={FiCopy}
/>
}
/>
</Tooltip>
</InputRightElement>
</InputGroup>
</Box>
)
{groupType === "off-chain" && _group.credentials && (
<Box
Expand Down