Skip to content

Commit

Permalink
added session format on top view
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelgeek committed Oct 16, 2024
1 parent 8f6229c commit 688fee9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 23 deletions.
48 changes: 26 additions & 22 deletions components/sessions/FilterSessions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,32 @@ export const FilterSessions: NextPage<FilterSessionProps> = ({
>
{sessions[0]}
</button>
<button
name="level"
type="button"
value={sessions[1]}
onClick={onClickFilter}
className={`${
filter?.level === sessions[1] && selectedClass
} border border-1 border-accent px-3 py-1 text-xs flex-1 text-center hover:cursor-pointer hover:bg-accent hover:text-black`}
>
{sessions[1]}
</button>
<button
name="level"
type="button"
value={sessions[2]}
onClick={(e) => onClickFilter(e)}
className={`${
filter?.level === sessions[2] && selectedClass
} border rounded-r-md border-1 border-accent px-3 py-1 text-xs flex-1 text-center hover:cursor-pointer hover:bg-accent hover:text-black`}
>
{sessions[2]}
</button>
{sessions[1] && (
<button
name="level"
type="button"
value={sessions[1]}
onClick={onClickFilter}
className={`${
filter?.level === sessions[1] && selectedClass
} border border-1 border-accent px-3 py-1 text-xs flex-1 text-center hover:cursor-pointer hover:bg-accent hover:text-black`}
>
{sessions[1]}
</button>
)}
{sessions[2] && (
<button
name="level"
type="button"
value={sessions[2]}
onClick={(e) => onClickFilter(e)}
className={`${
filter?.level === sessions[2] && selectedClass
} border rounded-r-md border-1 border-accent px-3 py-1 text-xs flex-1 text-center hover:cursor-pointer hover:bg-accent hover:text-black`}
>
{sessions[2]}
</button>
)}
</div>
))}
</div>
Expand Down
14 changes: 14 additions & 0 deletions components/sessions/SessionGridCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ export const SessionGridCard = ({
</span>
))}
</h3>
{!schedule.is_serviceSession && (
<p className="text-xs mt-2">
<span className="uppercase text-xs text-white dark:text-dark text-px-10 bg-black dark:bg-white-dark py-0.5 px-2 rounded-full">
#
{schedule.is_keynote
? 'Keynote'
: schedule.session_level}
</span>
<span className="black"> | </span>{' '}
<span className="text-primary dark:text-secondary-dark">
{schedule.session_format}
</span>{' '}
</p>
)}
{schedule.is_serviceSession ? (
<p className="text-sm mt-2 font-bold dark:text-white-dark mb-2">
{schedule.is_keynote ? 'Keynote: ' : ''}{' '}
Expand Down
15 changes: 14 additions & 1 deletion components/sessions/SessionListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ const SessionListCard = ({
{truncateString(schedule.description, 150)}
</p>
)}
{!schedule.is_serviceSession && (
<p className="text-xs mt-2 mb-3">
<span className="uppercase text-xs text-white dark:text-dark text-px-10 bg-black dark:bg-white-dark py-0.5 px-2 rounded-full">
#
{schedule.is_keynote
? 'Keynote'
: schedule.session_level}
</span>
<span className="black"> | </span>{' '}
<span className="text-primary dark:text-secondary-dark">
{schedule.session_format}
</span>{' '}
</p>
)}
<p className="text-xs md:text-sm font-light">
<span>
{hour(schedule.start_date_time)} -{' '}
Expand All @@ -74,7 +88,6 @@ const SessionListCard = ({
</span>
))}
</p>
{!schedule.is_serviceSession}
{schedule.speakers?.map((speaker) => (
<a
key={speaker.avatar}
Expand Down

0 comments on commit 688fee9

Please sign in to comment.