Skip to content

Commit

Permalink
Merge pull request #359 from careerfairsystems/redesign-student-sessi…
Browse files Browse the repository at this point in the history
…ons-items

Redesign student sessions items
  • Loading branch information
DannyTang002 authored Oct 9, 2024
2 parents 88f0fbc + 3518699 commit 17ce7f4
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 71 deletions.
94 changes: 61 additions & 33 deletions components/studentSessionList/SSCompInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Text, View } from "../Themed";

import { PublicCompanyDto } from "api/Companies";
import Colors from "constants/Colors";
import { ArkadText } from "components/StyledText";

type CompanyDetailsScreenProps = {
company: PublicCompanyDto;
Expand All @@ -13,50 +14,58 @@ export default function SSCompInfo({ company }: CompanyDetailsScreenProps) {
return (
<View style={styles.outerContainer}>
<View style={styles.container}>
<View style={styles.logoContainer}>
<Image
source={
company.logoUrl
? { uri: company.logoUrl }
: require("../../assets/images/icon.png")
}
defaultSource={require("../../assets/images/icon.png")}
style={styles.logo}
/>
<View style={styles.logoOuterContainer}>
<View style={styles.hardShadow} />
<View style={styles.logoContainer}>
<Image
source={
company.logoUrl
? { uri: company.logoUrl }
: require("../../assets/images/icon.png")
}
defaultSource={require("../../assets/images/icon.png")}
style={styles.logo}
/>
</View>
</View>

</View>
<View style={styles.infoContainer}>
<Text style={styles.title}>{company?.name}</Text>

<Text style={styles.descHeader}>About us</Text>
<Text style={styles.desc}>
{company.description ? company.description : "\u2013"}
</Text>
<ArkadText style={styles.descHeader} text={"ABOUT US"} />
<ArkadText style={styles.desc} text={company.description ? company.description : "\u2013"} />
</View>

</View>
);
}

const styles = StyleSheet.create({
center: {
alignItems: "center",
},
outerContainer: {
flex: 1,
},
container: {
display: "flex",
flex: 1,
padding: "8%",
alignItems: "center",
backgroundColor: Colors.arkadTurkos,
},
logoOuterContainer: {
marginTop: 8,
marginBottom: -28,
height: 128,
width: 128,
},
logoContainer: {
paddingTop: 10,
height: 120,
width: "90%",
height: "100%",
width: "100%",
backgroundColor: Colors.white,
borderColor: Colors.arkadOrange,
borderWidth: 4,
borderRadius: 10,
paddingBottom: 10,
paddingLeft: 10,
paddingRight: 10
borderRadius: 15,
padding: 10,
justifyContent: "center",
alignItems: "center",
},
logo: {
width: "100%",
Expand All @@ -83,18 +92,37 @@ const styles = StyleSheet.create({
fontFamily: "main-font-bold",
color: Colors.white,
},
hardShadow: {
height: 128,
width: 136,
borderRadius: 15,
position: "absolute",
backgroundColor: "#000000",
},
infoContainer: {
marginTop: 30,
flexDirection: "column",
alignItems: "center",
width: "100%",
},
descHeader: {
marginTop: 16,
marginBottom: 6,
alignSelf: "center",
textDecorationLine: "underline",
paddingTop: 16,
fontSize: 22,
fontFamily: "main-font-bold",
fontSize: 20,
color: Colors.white,
fontStyle: "normal",
lineHeight: 25,
fontWeight: "700",
letterSpacing: -0.45,
},
desc: {
paddingTop: 6,
fontSize: 18,
fontFamily: "main-font-bold",
fontSize: 17,
color: Colors.white,
alignSelf: "center",
textAlign: "left",
fontWeight: "400",
lineHeight: 25,
letterSpacing: -0.43,
},
});
3 changes: 1 addition & 2 deletions screens/studentSessions/SSsListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function SSsListScreen({ navigation, route }: SSsNavigation) {
}

return (
<View style={styles.container}>
<View>
<FlatList
data={null}
renderItem={null}
Expand Down Expand Up @@ -196,7 +196,6 @@ const styles = StyleSheet.create({
},
container: {
alignItems: "center",
backgroundColor: Colors.arkadNavy,
},
loadingContainer: {
marginTop: "10%",
Expand Down
44 changes: 8 additions & 36 deletions screens/studentSessions/SSsStudentNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SSsCompaniesScreen from "./SSsCompaniesScreen";
import SSsListScreen from "./SSsListScreen";
import SSsSwitchScreen from "./SSsSwitchScreen";
import { Image } from "react-native";
import Colors from "constants/Colors";

export type SSsStackParamlist = {
SSsCompaniesScreen: undefined;
Expand All @@ -34,18 +35,7 @@ export function SSsStudentNavigator() {
component={SSsCompaniesScreen}
options={{
title: "Student Sessions",
headerTitle: "Student Sessions",
headerRight: () => (
<Image
source={require("../../assets/images/arkad_logo_inverted.png")}
style={{
marginRight: 10,
width: 60,
height: undefined,
flex: 1,
}}
/>
),
headerTitle: "",
...HeaderStyles,
}}
/>
Expand All @@ -54,38 +44,20 @@ export function SSsStudentNavigator() {
component={SSsListScreen}
options={{
title: "Student Sessions List",
headerTitle: "Student Sessions",
headerRight: () => (
<Image
source={require("../../assets/images/arkad_logo_inverted.png")}
style={{
marginRight: 10,
width: 60,
height: undefined,
flex: 1,
}}
/>
),
headerTitle: "",
...HeaderStyles,
headerStyle: {
backgroundColor: Colors.arkadTurkos,
borderBottomWidth: 0,
},
}}
/>
<SSsStack.Screen
name="SSsSwitchScreen"
component={SSsSwitchScreen}
options={{
title: "Studentsession",
headerTitle: "Student Sessions",
headerRight: () => (
<Image
source={require("../../assets/images/arkad_logo_inverted.png")}
style={{
marginRight: 10,
width: 60,
height: undefined,
flex: 1,
}}
/>
),
headerTitle: "",
...HeaderStyles,
}}
/>
Expand Down
30 changes: 30 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,21 @@
resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz"
integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==

"@gorhom/bottom-sheet@^4":
version "4.6.4"
resolved "https://registry.yarnpkg.com/@gorhom/bottom-sheet/-/bottom-sheet-4.6.4.tgz#387d0f0f21e3470eb8575498cb81ce96f5108e79"
integrity sha512-0itLMblLBvepE065w3a60S030c2rNUsGshPC7wbWDm31VyqoaU2xjzh/ojH62YIJOcobBr5QoC30IxBBKDGovQ==
dependencies:
"@gorhom/portal" "1.0.14"
invariant "^2.2.4"

"@gorhom/[email protected]":
version "1.0.14"
resolved "https://registry.yarnpkg.com/@gorhom/portal/-/portal-1.0.14.tgz#1953edb76aaba80fb24021dc774550194a18e111"
integrity sha512-MXyL4xvCjmgaORr/rtryDNFy3kU4qUbKlwtQqqsygd0xX3mhKjOLn6mQK8wfu0RkoE0pBE0nAasRoHua+/QZ7A==
dependencies:
nanoid "^3.3.1"

"@graphql-typed-document-node/core@^3.1.0":
version "3.2.0"
resolved "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz"
Expand Down Expand Up @@ -7789,6 +7804,11 @@ nanoid@^3.1.15, nanoid@^3.3.6:
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz"
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==

nanoid@^3.3.1:
version "3.3.7"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==

napi-build-utils@^1.0.1:
version "1.0.2"
resolved "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz"
Expand Down Expand Up @@ -9035,6 +9055,11 @@ react-native-qrcode-svg@^6.1.1:
prop-types "^15.8.0"
qrcode "^1.5.1"

react-native-raw-bottom-sheet@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-native-raw-bottom-sheet/-/react-native-raw-bottom-sheet-3.0.0.tgz#8e7838ab9b8113bcccdc9648b41eb2bd54e86243"
integrity sha512-kHR7j2ExCLqf/AO3MECozMJXi48O1+YxUYSRgRo/5Ftm7mEcrxJEzvjqMmqUbVhhKlfk5hLCGFnEQ5Z9OHCUtg==

react-native-reanimated@~2.14.4:
version "2.14.4"
resolved "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.14.4.tgz"
Expand Down Expand Up @@ -9208,6 +9233,11 @@ readline@^1.3.0:
resolved "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz"
integrity sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==

reanimated-bottom-sheet@^1.0.0-alpha.22:
version "1.0.0-alpha.22"
resolved "https://registry.yarnpkg.com/reanimated-bottom-sheet/-/reanimated-bottom-sheet-1.0.0-alpha.22.tgz#01a200946f1a461f01f1e773e5b4961c2df2e53b"
integrity sha512-NxecCn+2iA4YzkFuRK5/b86GHHS2OhZ9VRgiM4q18AC20YE/psRilqxzXCKBEvkOjP5AaAvY0yfE7EkEFBjTvw==

recast@^0.21.0:
version "0.21.5"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.21.5.tgz#e8cd22bb51bcd6130e54f87955d33a2b2e57b495"
Expand Down

0 comments on commit 17ce7f4

Please sign in to comment.