-
Notifications
You must be signed in to change notification settings - Fork 5
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
ff19d4f
commit 976514d
Showing
3 changed files
with
74 additions
and
60 deletions.
There are no files selected for viewing
114 changes: 60 additions & 54 deletions
114
components/MobileLanding/ContactUs/MobileContactCard/MobileContactCard.tsx
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,66 +1,72 @@ | ||
import styles from './card.module.scss' | ||
import styles from "./card.module.scss"; | ||
import Image from "next/image"; | ||
|
||
import background from '@/assets/MobileLanding/ContactUs/CardBackground.svg' | ||
import phoneIcon from '@/assets/MobileLanding/ContactUs/PhoneIcon.svg' | ||
import mailIcon from '@/assets/MobileLanding/ContactUs/MailIcon.svg' | ||
import {StaticImport} from "next/dist/shared/lib/get-img-props"; | ||
import background from "@/assets/MobileLanding/ContactUs/CardBackground.svg"; | ||
import phoneIcon from "@/assets/MobileLanding/ContactUs/PhoneIcon.svg"; | ||
import mailIcon from "@/assets/MobileLanding/ContactUs/MailIcon.svg"; | ||
import { StaticImport } from "next/dist/shared/lib/get-img-props"; | ||
|
||
interface Props { | ||
name: string; | ||
image: string | StaticImport; | ||
dep1: string; | ||
dep2: string; | ||
contactDetails: boolean; | ||
phone: string | null; | ||
email: string | null; | ||
name: string; | ||
image: string | StaticImport; | ||
dep1: string; | ||
dep2: string; | ||
contactDetails: boolean; | ||
phone: string | null; | ||
email: string | null; | ||
} | ||
|
||
interface ContactProps { | ||
phone: string | null; | ||
email: string | null; | ||
phone: string | null; | ||
email: string | null; | ||
} | ||
|
||
export function ContactBlock({phone, email}: ContactProps) { | ||
return ( | ||
<div className={styles.contactBlock}> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={phone ?? '#'} | ||
style={{visibility: phone === null ? "hidden" : "visible"}} | ||
> | ||
<Image src={phoneIcon} alt='phone icon'/> | ||
</a> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={email ?? '#'} | ||
style={{visibility: email === null ? "hidden" : "visible"}} | ||
> | ||
<Image src={mailIcon} alt='mail icon'/> | ||
</a> | ||
</div> | ||
) | ||
export function ContactBlock({ phone, email }: ContactProps) { | ||
return ( | ||
<div className={styles.contactBlock}> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={phone ?? "#"} | ||
style={{ visibility: phone === null ? "hidden" : "visible" }} | ||
> | ||
<Image src={phoneIcon} alt="phone icon" /> | ||
</a> | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={email ?? "#"} | ||
style={{ visibility: email === null ? "hidden" : "visible" }} | ||
> | ||
<Image src={mailIcon} alt="mail icon" /> | ||
</a> | ||
</div> | ||
); | ||
} | ||
|
||
export default function MobileContactCard({ | ||
name, image, dep1, dep2, contactDetails, phone, email | ||
}: Props) { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.cardContent}> | ||
<p className={styles.heading}>{name}</p> | ||
<Image src={image} alt={name} className={styles.image}/> | ||
<p className={styles.desc}>{dep1}</p> | ||
<p className={styles.desc}>{dep2}</p> | ||
{contactDetails ? <ContactBlock email={email} phone={phone}/> : null} | ||
</div> | ||
<Image | ||
src={background} | ||
alt='card background' | ||
className={styles.background} | ||
/> | ||
</div> | ||
) | ||
} | ||
name, | ||
image, | ||
dep1, | ||
dep2, | ||
contactDetails, | ||
phone, | ||
email, | ||
}: Props) { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.cardContent}> | ||
<p className={styles.heading}>{name}</p> | ||
<Image src={image} alt={name} className={styles.image} /> | ||
<p className={styles.desc}>{dep1}</p> | ||
<p className={styles.desc}>{dep2}</p> | ||
{contactDetails ? <ContactBlock email={email} phone={phone} /> : null} | ||
</div> | ||
<Image | ||
src={background} | ||
alt="card background" | ||
className={styles.background} | ||
/> | ||
</div> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -100,9 +100,6 @@ | |
height: auto; | ||
} | ||
} | ||
|
||
&:last-of-type { | ||
} | ||
} | ||
|
||
.artistContainer { | ||
|