-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from isd-sgcu/sun/fdr-37-emegency-contact
Sun/fdr 37 emegency contact
- Loading branch information
Showing
7 changed files
with
151 additions
and
5 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import Border from '@/components/Border'; | ||
import Image from 'next/image'; | ||
import { Icon } from '@iconify/react'; | ||
import object from '@/assets/emergency-contact/Objects.svg'; | ||
import EmergencyIcon from '@/assets/emergency-contact/emergency-icon.svg'; | ||
import EmergencyCallBlock from '@/components/emergency-contact/EmergencyCallBlock'; | ||
|
||
export default function Emergency() { | ||
return ( | ||
<main className="w-full h-screen flex justify-center items-center flex-col"> | ||
<Border variant="transparent"> | ||
<div className="mt-7 flex flex-col items-center gap-y-3"> | ||
<h1 className="w-4/5 text-center font-light text-4xl font-season italic "> | ||
Emergency Contact | ||
</h1> | ||
<Image | ||
src={object} | ||
alt="object" | ||
></Image> | ||
</div> | ||
<div className="mt-2 flex flex-col gap-y-4 items-center"> | ||
<p className="font-athiti font-medium">เหตุฉุกเฉิน</p> | ||
<div className="size-[221px] bg-project-gray/50 rounded-full flex flex-col items-center justify-center"> | ||
<div className="size-[185px] bg-project-gray rounded-full flex flex-col items-center justify-center"> | ||
<a href="tel:022180000"> | ||
<div className="size-[163px] bg-project-fuchsia rounded-full flex flex-col items-center justify-center"> | ||
<Image | ||
src={EmergencyIcon} | ||
alt="emergency icon" | ||
className="" | ||
></Image> | ||
<p className="text-white text-xs">ศูนย์ รปภ. จุฬาฯ</p> | ||
<p className="text-white text-xs">02-218-0000</p> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="mt-4 flex flex-col gap-y-3 w-11/12"> | ||
<EmergencyCallBlock | ||
text="เหตุภายนอกมหาวิทยาลัย" | ||
phoneNumber="191" | ||
/> | ||
<EmergencyCallBlock | ||
text="อุบัติเหตุร้ายแรง" | ||
phoneNumber="1669" | ||
/> | ||
</div> | ||
<div className="w-full flex flex-col gap-y-4 mt-7 items-center"> | ||
<Image | ||
src={object} | ||
alt="object" | ||
></Image> | ||
<button className="w-3/4 p-2 rounded-lg border-[1px] border-project-fuchsia"> | ||
<a href="/home"> | ||
<div className="flex flex-row gap-x-2 text-project-fuchsia justify-center items-center"> | ||
<Icon | ||
icon="ion:chevron-back" | ||
width={24} | ||
height={24} | ||
/> | ||
<p className="font-athiti text-xl font-medium"> | ||
กลับสู่หน้าหลัก | ||
</p> | ||
</div> | ||
</a> | ||
</button> | ||
</div> | ||
</Border> | ||
</main> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
import React from 'react'; | ||
import { Icon } from '@iconify/react'; | ||
|
||
interface EmergencyCallProps { | ||
text: string; | ||
phoneNumber: string; | ||
} | ||
|
||
const EmergencyCallBlock: React.FC<EmergencyCallProps> = ({ | ||
text, | ||
phoneNumber, | ||
}) => { | ||
return ( | ||
<div className="shadow-[0_2px_4px_0px_rgba(0,0,0,0.25)] rounded-xl flex items-center flex-row justify-between px-3 py-1"> | ||
<div className="flex flex-col gap-y-1"> | ||
<p className="font-athiti text-base font-medium text-black">{text}</p> | ||
<p className="font-athiti text-base font-medium text-black opacity-50"> | ||
{phoneNumber} | ||
</p> | ||
</div> | ||
<div className="flex justify-center items-center"> | ||
<a href={`tel:${phoneNumber}`}> | ||
<button className="shadow-[0_0_4px_0px_rgba(0,0,0,0.25)] flex rounded-full flex-cols size-11 bg-project-fuchsia justify-center items-center"> | ||
<Icon | ||
icon="fluent:call-connecting-20-filled" | ||
className="text-white" | ||
width={24} | ||
height={24} | ||
/> | ||
</button> | ||
</a> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EmergencyCallBlock; |
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