Skip to content

Commit b1734b8

Browse files
committed
updated sessions view
1 parent b6a1ad4 commit b1734b8

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

components/sessions/SessionDetails.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const SessionDetails = ({ session }: { session: Session }) => {
2121
<div className="pt-4 md:pt-6">
2222
{session.session_image && (
2323
<img
24-
className="rounded-lg h-auto md:h-56"
24+
className="rounded-lg h-auto"
2525
src={session.session_image}
2626
alt="session"
2727
/>
@@ -45,11 +45,11 @@ export const SessionDetails = ({ session }: { session: Session }) => {
4545
</span>
4646
))}
4747
</h4>
48-
<p className=" text-xl md:text-2xl mt-1 font-bold">{session.title}</p>
48+
<p className="text-xl md:text-2xl mt-1 font-bold">{session.title}</p>
4949
<h6 className="text-primary dark:text-white-dark font-bold mt-4 md:mt-10 w-full">
5050
Session Description:
5151
</h6>
52-
<p className="p gray mt-2">{session.description}</p>
52+
<p className="p gray mt-2 break-words">{session.description}</p>
5353

5454
<div className="w-full justify-center md:justify-start flex flex-col mt-4 md:mt-10 mb-4 lg:mb-16">
5555
<StarIcon isStar={false} session={session} />

components/sessions/SessionGridCard.tsx

+7-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export const SessionGridCard = ({
3636
{schedule.is_serviceSession ? (
3737
<img
3838
className="object-cover md:object-cover"
39-
src={schedule.session_image ?? '/images/all.png'}
39+
src={
40+
schedule.session_image ?? '/images/all-new.png'
41+
}
4042
alt={schedule.title}
4143
/>
4244
) : (
@@ -48,7 +50,9 @@ export const SessionGridCard = ({
4850
<a>
4951
<img
5052
className="object-cover md:object-cover"
51-
src={schedule.session_image ?? 'images/all.png'}
53+
src={
54+
schedule.session_image ?? 'images/all-new.png'
55+
}
5256
alt={schedule.title}
5357
/>
5458
</a>
@@ -125,7 +129,7 @@ export const SessionGridCard = ({
125129
}
126130
</div>
127131
) : (
128-
<NoSessions />
132+
<NoSessions key={key} />
129133
))
130134
)}
131135
</div>

components/sessions/SessionListCard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const SessionListCard = ({
102102
}
103103
</div>
104104
) : (
105-
<NoSessions />
105+
<NoSessions key={key} />
106106
))
107107
)}
108108
</div>

components/sessions/SessionToggles.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ export const SessionToggles: NextPage<SessionPageProps> = ({
2121

2222
return (
2323
<div className="space-x-4 md:space-x-8 w-full md:w-1/3 flex justify-end items-center">
24-
<button type="button" onClick={() => onChangeViewType(false)}>
24+
<button type="button" onClick={() => onChangeViewType(true)}>
2525
<i
26-
className={`fa fa-th-list text-2xl ${
27-
isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
26+
className={`fa fa-th text-2xl ${
27+
!isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
2828
}`}
2929
/>
3030
</button>
31-
<button type="button" onClick={() => onChangeViewType(true)}>
31+
<button type="button" onClick={() => onChangeViewType(false)}>
3232
<i
33-
className={`fa fa-th text-2xl ${
34-
!isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
33+
className={`fa fa-th-list text-2xl ${
34+
isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
3535
}`}
3636
/>
3737
</button>

hooks/useSession.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const MY_SESSIONS = 'droidcon_my_sessions'
99

1010
export const useSession = ({ allSchedules }: { allSchedules: Schedule[] }) => {
1111
const [showFilterSession, setShowFilterSession] = useState(false)
12-
const [isGridView, setIsGridView] = useState(false)
12+
const [isGridView, setIsGridView] = useState(true)
1313
const [activeTab, setActiveTab] = useState(0)
1414
const [showMySessions, setShowMysessions] = useState(false)
1515
const [loading, setLoading] = useState(false)

public/images/all-new.png

1.83 MB
Loading

0 commit comments

Comments
 (0)