File tree Expand file tree Collapse file tree
app/modules/MainEventModule
MEWalkInInterviewPage/CompanyDetailModule/sections Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { MapPin , PenLine , Timer } from 'lucide-react' ;
2- import { Link } from 'react-router' ;
2+ import { Link , useRouteLoaderData } from 'react-router' ;
33import Countdown from '~/components/elements/Countdown' ;
44import { Button } from '~/components/ui/button' ;
55import Image from '~/components/ui/image' ;
66import { scrollTo } from '~/components/utils/scrollTo' ;
7+ import type { userDataType } from '~/routes/_page' ;
78
89const Hero = ( ) => {
910 const data = {
@@ -12,6 +13,10 @@ const Hero = () => {
1213 tempat : 'Balairung Universitas Indonesia' ,
1314 } ;
1415
16+ const userData = (
17+ useRouteLoaderData ( 'root' ) as { loggedInUser : userDataType }
18+ ) . loggedInUser ;
19+
1520 return (
1621 < section className = "flex flex-col gap-5 items-center w-screen relative lg:mb-20" >
1722 { /* !!! mobile bg images. mobile bg images have thicker lines */ }
@@ -59,7 +64,7 @@ const Hero = () => {
5964 </ div >
6065
6166 < div className = "grid lg:grid-cols-2 gap-4" >
62- < Link to = " /main-event/register" >
67+ < Link to = { userData . phoneNumber ? ' /main-event/register' : '/register?redirect_to=/main-event/register' } >
6368 < Button className = "w-44 md:w-80 lg:w-68 text-white" >
6469 < PenLine />
6570 Register
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export default function Profile({
198198 Pilih Jam Sesi Wawancara
199199 </ div >
200200
201- < div className = "flex flex-wrap gap-3 w-full" >
201+ < div className = "flex flex-wrap justify-center gap-3 w-full" >
202202 { availableSessions . map ( ( session ) => (
203203 < div
204204 key = { session . id }
You can’t perform that action at this time.
0 commit comments