diff --git a/components/IGCard.tsx b/components/IGCard.tsx
index 7394295..37bf3fc 100644
--- a/components/IGCard.tsx
+++ b/components/IGCard.tsx
@@ -21,7 +21,7 @@ import {
VStack,
} from '@chakra-ui/react'
import React from 'react'
-import { FaTelegram, FaUserCircle } from 'react-icons/fa'
+import { FaTelegram, FaUser, FaUserCircle } from 'react-icons/fa'
import Link from 'next/link'
import ImageWithFallback from './ImageWithFallback'
import { DEFAULT_PNG_NAME } from '../utils'
@@ -35,45 +35,28 @@ type LeftPaneProps = {
imageKey: number
imageSrc: string
isInactive: boolean
+ inviteLink: string
+ primaryIGHead: User | null
}
const getContactButton = (contact: User | null, width?: string) => {
- // const toast = useToast()
- //
- // const copyToClipboard = () => {
- // const nameToCopy = contact?.name || 'No contact found'
- // navigator.clipboard.writeText(nameToCopy)
- //
- // // Show toast alert
- // toast({
- // title: 'Copied to clipboard!',
- // status: 'success',
- // duration: 3000,
- // isClosable: true,
- // position: 'bottom',
- // })
- // }
- //
- // const isContactFound = contact !== null && contact.name !== undefined
-
return (
}
variant='outline'
+ size='xs'
colorScheme='facebook'
minWidth={width || 'auto'}
maxWidth={width || 'auto'}
rounded='15px'
style={{
borderRadius: '0.5rem',
+ border: '1px solid #144a70',
display: 'flex',
alignItems: 'center',
}}
- // onClick={copyToClipboard}
- // isDisabled={!isContactFound}
- isDisabled={true}
>
{contact?.name || 'No contact found'}
@@ -88,27 +71,36 @@ const getInviteLinkButton = (inviteLink: string, width?: string) => {
}
+ variant='outline'
+ size='xs'
colorScheme='telegram'
minWidth={width || 'auto'}
maxWidth={width || 'auto'}
rounded='15px'
style={{ borderRadius: '0.5rem', border: '1px solid #229ed9' }}
>
-
+ Invite Link
)
}
-const LeftPane: React.FC = ({ imageKey, imageSrc, isInactive }) => {
+const LeftPane: React.FC = ({
+ imageKey,
+ imageSrc,
+ isInactive,
+ inviteLink,
+ primaryIGHead,
+}) => {
return (
-
-
+
+
= ({ imageKey, imageSrc, isInactive }) =
<>>
)}
+ {getContactButton(primaryIGHead, '95px')}
+
+ {getInviteLinkButton(inviteLink, '95px')}
+
)
}
@@ -160,10 +156,10 @@ const IGCard: React.FC = ({ imageKey, ig_info }) => {
= ({ imageKey, ig_info }) => {
style={{ height: '100%' }}
border='1px solid darkgrey'
>
-
+
@@ -182,7 +184,7 @@ const IGCard: React.FC = ({ imageKey, ig_info }) => {
pt='1vh'
css={{
display: '-webkit-box',
- WebkitLineClamp: 3,
+ WebkitLineClamp: 4,
WebkitBoxOrient: 'vertical',
overflow: 'hidden',
}}
@@ -190,12 +192,6 @@ const IGCard: React.FC = ({ imageKey, ig_info }) => {
{ig_info.description}
-
-
- {getInviteLinkButton(inviteLink)}
- {getContactButton(primaryIGHead)}
-
-
diff --git a/components/IGSearchFilter.tsx b/components/IGSearchFilter.tsx
index 940f66f..b5691c2 100644
--- a/components/IGSearchFilter.tsx
+++ b/components/IGSearchFilter.tsx
@@ -1,6 +1,7 @@
import React from 'react'
import {
Box,
+ Card,
Center,
Checkbox,
CheckboxGroup,
@@ -9,8 +10,10 @@ import {
Input,
InputGroup,
InputLeftElement,
+ SimpleGrid,
Stack,
VStack,
+ useBreakpointValue,
} from '@chakra-ui/react'
import { SearchIcon } from '@chakra-ui/icons'
import { DEFAULT_FILTERS } from '../pages/student-groups'
@@ -28,9 +31,39 @@ const IGSearchFilter: React.FC = ({
onInactiveChange,
interestGroupCategories,
}) => {
+ const isGrid = useBreakpointValue({ base: true, md: false })
+
+ const CheckboxLayout = () => {
+ const checkboxes = Object.entries(interestGroupCategories).map((category) => (
+
+ {category[1]}
+
+ ))
+ if (isGrid) {
+ return (
+
+ {checkboxes}
+
+ Inactive
+
+
+ )
+ } else {
+ return (
+
+ {checkboxes}
+
+
+ Inactive
+
+
+ )
+ }
+ }
+
return (
-
-
+
+
@@ -44,17 +77,7 @@ const IGSearchFilter: React.FC = ({
/>
-
- {Object.entries(interestGroupCategories).map((category) => (
-
- {category[1]}
-
- ))}
-
-
- Inactive
-
-
+
)