-
Notifications
You must be signed in to change notification settings - Fork 0
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 #27 from opengento/program
Program
- Loading branch information
Showing
7 changed files
with
155 additions
and
46 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
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import { SessionProps } from "./SessionProps"; | ||
import Modal from "@/components/Modal/Modal"; | ||
import SessionPopInContent from "./SessionPopInContent"; | ||
|
||
const SessionPopIn = ({ | ||
selectedSession, | ||
isOpen, | ||
onClose, | ||
}: { | ||
selectedSession: SessionProps; | ||
isOpen: boolean; | ||
onClose: () => void; | ||
}) => { | ||
return ( | ||
<Modal isOpen={isOpen} onClose={onClose}> | ||
<SessionPopInContent session={selectedSession} /> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default SessionPopIn; |
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 { SessionProps } from "./SessionProps"; | ||
import Session from "./Session"; | ||
import Person from "@/components/Person/Person"; | ||
import useDataProvider from "@/hooks/useDataProvider"; | ||
import Typography from "@/components/Typography/Typography"; | ||
import { PiCalendarPlus } from "react-icons/pi"; | ||
|
||
const SessionPopInContent = ({ session }: { session: SessionProps }) => { | ||
const dataProvider = useDataProvider(); | ||
const speakers = dataProvider | ||
.usePersonList("speakers", "data.speakers") | ||
.filter((speaker) => session.speakers.includes(speaker.id)); | ||
return ( | ||
<div className="session-pop-in-content flex flex-col gap-6"> | ||
<Session session={session} /> | ||
<div className="flex flex-col rounded-xl bg-white p-6 gap-6"> | ||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4"> | ||
{speakers.map((speaker) => ( | ||
<Person person={speaker} appearance="program" key={speaker.id} /> | ||
))} | ||
</div> | ||
<Typography variant="body1">{session.description}</Typography> | ||
</div> | ||
<div className="flex justify-center"> | ||
<div className="flex flex-row items-center gap-1 bg-primary px-4 py-2 rounded-full hover:cursor-pointer"> | ||
<PiCalendarPlus size={20} className="text-white" /> | ||
<span className="text-base text-white font-semibold"> | ||
Ajouter cette conférence à mon agenda | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SessionPopInContent; |
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