Skip to content

Commit

Permalink
ran prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y committed Apr 8, 2024
1 parent e62a67c commit eefb0c0
Showing 1 changed file with 9 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CheckCircleIcon, ExternalLinkIcon, LockIcon, UnlockIcon } from "@chakra-ui/icons";
import { Box, Flex, IconButton, Link, Heading, Text, Tooltip, useClipboard, useToast, Icon } from "@chakra-ui/react";
import { Box, Flex, Heading, Icon, IconButton, Link, Text, Tooltip, useClipboard, useToast } from "@chakra-ui/react";
import { useEnclavesContext } from "../../EnclavesContext";
import { PortsTableRow } from "../tables/PortsTable";

Expand All @@ -26,27 +26,18 @@ export const PortMaybeLink = ({ port, disablePortLocking }: PortMaybeLinkProps)
isClosable: true,
position: "bottom-right",
render: () => (
<Flex
color='white'
p={3}
bg={lock ? "green.500" : "yellow.500"}
borderRadius={6}
gap={4}
>
<Flex color="white" p={3} bg={lock ? "green.500" : "yellow.500"} borderRadius={6} gap={4}>
<Icon as={CheckCircleIcon} w={6} h={6} />
<Box>
<Heading
as="h4"
fontSize="md"
fontWeight="500"
color="white"
>
<Heading as="h4" fontSize="md" fontWeight="500" color="white">
Link {lock ? "locked" : "unlocked"}
</Heading>
<Text marginTop={1} color="white">The link has been {lock ? "locked" : "unlocked"} and copied to the clipboard.</Text>
<Text marginTop={1} color="white">
The link has been {lock ? "locked" : "unlocked"} and copied to the clipboard.
</Text>
</Box>
</Flex>
)
),
});
};

Expand All @@ -55,16 +46,13 @@ export const PortMaybeLink = ({ port, disablePortLocking }: PortMaybeLinkProps)
{isHttpLink ? (
<Flex alignItems="center">
{port.port.locked === undefined && (
<Tooltip
label={port.port.locked ? "Publish port" : "Make port private"}
fontSize="small"
>
<Tooltip label={port.port.locked ? "Publish port" : "Make port private"} fontSize="small">
<IconButton
icon={port.port.locked ? <LockIcon /> : <UnlockIcon />}
variant={"ghost"}
size={"xs"}
cursor="pointer"
onClick={() => handleLockUnlockClick}
onClick={() => handleLockUnlockClick}
pointerEvents={disablePortLocking ? "none" : "auto"}
color={disablePortLocking ? "gray.200" : "white"}
aria-label={port.port.locked ? "Publish port" : "Make port private"}
Expand Down

0 comments on commit eefb0c0

Please sign in to comment.