-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1887b8
commit d6c63d1
Showing
18 changed files
with
21,458 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,56 @@ | ||
import { Box, Text, ColorName, Colors} from "@/app/(design-system)" | ||
import RecruitmentCycleIcon from '@/assets/svg/recruitment-cycle.svg'; | ||
import RecruitmentStatusIcon from '@/assets/svg/recruiting-status.svg'; | ||
import ApplicationTypeIcon from '@/assets/svg/application-type.svg'; | ||
import { RecruitmentCycle, RecruitmentType } from "@generatesac/lib"; | ||
import { SvgProps } from 'react-native-svg'; | ||
import { ReactElement } from 'react'; | ||
import React from 'react'; | ||
import { RecruitmentCycle, RecruitmentType } from '@generatesac/lib'; | ||
import { Box, ColorName } from '@/app/(design-system)'; | ||
import { faCalendar } from '@fortawesome/free-regular-svg-icons/faCalendar'; | ||
import { faPenToSquare } from '@fortawesome/free-solid-svg-icons/faPenToSquare'; | ||
import { faComments } from '@fortawesome/free-solid-svg-icons/faComments'; | ||
import { RecruitmentItem } from './club-recruitment-item'; | ||
|
||
interface RecruitmentInfoProps { | ||
color: ColorName, | ||
recruitmentCycle: RecruitmentCycle, | ||
recruitingType: RecruitmentType, | ||
isRecruiting?: boolean, | ||
recruitmentText: string, | ||
color: ColorName; | ||
recruitmentCycle: RecruitmentCycle; | ||
recruitingType: RecruitmentType; | ||
isRecruiting?: boolean; | ||
recruitmentText: string; | ||
} | ||
|
||
interface RecruitmentItemProps { | ||
icon: ReactElement<SvgProps>, | ||
title: string, | ||
text?: string | undefined, | ||
} | ||
|
||
const capitalize = (str: string) => { | ||
if (!str) return ''; | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
} | ||
|
||
export const RecruitmentInfo = ({recruitmentText, color, recruitmentCycle, recruitingType, isRecruiting = false}: RecruitmentInfoProps) => { | ||
const RecruitmentItem = ({icon, title, text}: RecruitmentItemProps) => { | ||
return ( | ||
<Box alignItems="center" borderWidth={1} borderColor={color} borderRadius={8} width={'30%'}> | ||
<Box paddingTop="l" paddingBottom="l" gap="xs" flexDirection="column" alignItems="center"> | ||
{icon} | ||
<Text style={{textAlign: 'center', fontWeight: '600', fontSize: 14 }}>{capitalize(title)}</Text> | ||
{text && <Text variant="caption-1" style={{textAlign: 'center'}}>{capitalize(text)}</Text>} | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
return ( | ||
<Box padding="l" flexDirection="row" gap="m" alignItems="stretch" justifyContent="space-evenly"> | ||
<RecruitmentItem icon={<RecruitmentCycleIcon fill={Colors[color]}/>} title="Recruitment Cycle" text={recruitmentCycle}/> | ||
<RecruitmentItem icon={<RecruitmentStatusIcon fill={Colors[color]}/>} title={isRecruiting ? "Currently Recruiting" : "Currently Not Recruiting"} text={recruitmentText}/> | ||
<RecruitmentItem icon={<ApplicationTypeIcon fill={Colors[color]}/>} title="Application Type" text={recruitingType}/> | ||
</Box> | ||
) | ||
} | ||
export const RecruitmentInfo = ({ | ||
recruitmentText, | ||
color, | ||
recruitmentCycle, | ||
recruitingType, | ||
isRecruiting = false, | ||
}: RecruitmentInfoProps) => { | ||
return ( | ||
<Box | ||
padding="l" | ||
flexDirection="row" | ||
gap="m" | ||
alignItems="stretch" | ||
justifyContent="space-evenly" | ||
> | ||
<RecruitmentItem | ||
icon={faCalendar} | ||
title="Recruitment Cycle" | ||
text={recruitmentCycle} | ||
color={color} | ||
/> | ||
<RecruitmentItem | ||
icon={faPenToSquare} | ||
title={ | ||
isRecruiting | ||
? 'Currently Recruiting' | ||
: 'Currently Not Recruiting' | ||
} | ||
text={recruitmentText} | ||
color={color} | ||
/> | ||
<RecruitmentItem | ||
icon={faComments} | ||
title="Application Type" | ||
text={recruitingType} | ||
color={color} | ||
/> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Box, ColorName, Colors, Text } from "@/app/(design-system)"; | ||
import { firstLetterUppercase } from "@/utils/string"; | ||
import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-native-fontawesome"; | ||
|
||
interface RecruitmentItemProps { | ||
icon: IconDefinition; | ||
title: string; | ||
text: string; | ||
color: ColorName; | ||
} | ||
|
||
export const RecruitmentItem = ({ icon, title, text, color }: RecruitmentItemProps) => { | ||
return ( | ||
<Box | ||
alignItems="center" | ||
borderWidth={1} | ||
borderColor={color} | ||
borderRadius={8} | ||
width={'30%'} | ||
> | ||
<Box | ||
paddingTop="l" | ||
paddingBottom="l" | ||
gap="xs" | ||
flexDirection="column" | ||
alignItems="center" | ||
> | ||
<FontAwesomeIcon size={30} color={Colors[color]} icon={icon} /> | ||
<Text | ||
style={{ | ||
textAlign: 'center', | ||
fontWeight: '600', | ||
fontSize: 14, | ||
}} | ||
> | ||
{firstLetterUppercase(title)} | ||
</Text> | ||
<Text variant="caption-1" style={{ textAlign: 'center' }}> | ||
{firstLetterUppercase(text)} | ||
</Text> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
const { getDefaultConfig } = require("expo/metro-config"); | ||
const { getDefaultConfig } = require('expo/metro-config'); | ||
|
||
module.exports = (() => { | ||
const config = getDefaultConfig(__dirname); | ||
const config = getDefaultConfig(__dirname); | ||
|
||
const { transformer, resolver } = config; | ||
const { transformer, resolver } = config; | ||
|
||
config.transformer = { | ||
...transformer, | ||
babelTransformerPath: require.resolve("react-native-svg-transformer"), | ||
}; | ||
config.resolver = { | ||
...resolver, | ||
assetExts: resolver.assetExts.filter((ext) => ext !== "svg"), | ||
sourceExts: [...resolver.sourceExts, "svg"], | ||
}; | ||
config.transformer = { | ||
...transformer, | ||
babelTransformerPath: require.resolve('react-native-svg-transformer') | ||
}; | ||
config.resolver = { | ||
...resolver, | ||
assetExts: resolver.assetExts.filter((ext) => ext !== 'svg'), | ||
sourceExts: [...resolver.sourceExts, 'svg'] | ||
}; | ||
|
||
return config; | ||
})(); | ||
return config; | ||
})(); |
Oops, something went wrong.