11import {
22 Button ,
3+ Container ,
34 Grid ,
45 GridColumn ,
56 Heading ,
@@ -9,7 +10,7 @@ import {
910 StyledText ,
1011 Text ,
1112} from "@python-italia/pycon-styleguide" ;
12- import { LiveIcon } from "@python-italia/pycon-styleguide/icons" ;
13+ import { ArrowIcon , LiveIcon } from "@python-italia/pycon-styleguide/icons" ;
1314import { SnakeWithPopcorn } from "@python-italia/pycon-styleguide/illustrations" ;
1415import { isAfter , isBefore , parseISO } from "date-fns" ;
1516import { fromZonedTime } from "date-fns-tz" ;
@@ -20,6 +21,7 @@ import { compile } from "~/helpers/markdown";
2021import { useCurrentLanguage } from "~/locale/context" ;
2122
2223import { Fragment } from "react" ;
24+ import { createHref } from "~/components/link" ;
2325import { TableItemHeader } from "~/components/table-item-header" ;
2426import type { ProposalMaterial , TalkQuery } from "~/types" ;
2527import { ParticipantInfoSection } from "../participant-info-section" ;
@@ -63,6 +65,28 @@ const isEventLive = (startTime: string, endTime: string) => {
6365 return isAfter ( now , utcStart ) && isBefore ( now , utcEnd ) ;
6466} ;
6567
68+ const BackToScheduleLink = ( ) => {
69+ const language = useCurrentLanguage ( ) ;
70+
71+ return (
72+ < Link
73+ href = { createHref ( {
74+ path : "/schedule" ,
75+ locale : language ,
76+ } ) }
77+ >
78+ < div className = "flex items-center gap-2" >
79+ < div className = "rotate-90" >
80+ < ArrowIcon />
81+ </ div >
82+ < Text decoration = "underline" size = { 2 } weight = "strong" >
83+ < FormattedMessage id = "schedule.backToSchedule" />
84+ </ Text >
85+ </ div >
86+ </ Link >
87+ ) ;
88+ } ;
89+
6690export const ScheduleEventDetail = ( {
6791 id,
6892 slug,
@@ -102,6 +126,10 @@ export const ScheduleEventDetail = ({
102126
103127 return (
104128 < >
129+ < Container >
130+ < Spacer size = "large" />
131+ < BackToScheduleLink />
132+ </ Container >
105133 < Section illustration = "snakeHead" >
106134 < EventTag type = { type } />
107135 < Spacer size = "2md" />
@@ -224,6 +252,10 @@ export const ScheduleEventDetail = ({
224252 ) ) }
225253 </ Section >
226254 ) }
255+ < Container >
256+ < BackToScheduleLink />
257+ < Spacer size = "large" />
258+ </ Container >
227259 </ >
228260 ) ;
229261} ;
0 commit comments