Skip to content

Commit 8f6229c

Browse files
committed
updated sessions view
1 parent 4b174f1 commit 8f6229c

File tree

8 files changed

+33
-26
lines changed

8 files changed

+33
-26
lines changed

components/sessions/SessionDetails.tsx

+2-2
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 w-full"
2525
src={session.session_image}
2626
alt="session"
2727
/>
@@ -49,7 +49,7 @@ export const SessionDetails = ({ session }: { session: Session }) => {
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

+5-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const SessionGridCard = ({
3131
{schedule.is_serviceSession ? (
3232
<img
3333
className="object-cover md:object-cover"
34-
src={schedule.session_image ?? '/images/all.png'}
34+
src={schedule.session_image ?? '/images/all-new.png'}
3535
alt={schedule.title}
3636
/>
3737
) : (
@@ -43,7 +43,9 @@ export const SessionGridCard = ({
4343
<a>
4444
<img
4545
className="object-cover md:object-cover"
46-
src={schedule.session_image ?? 'images/all.png'}
46+
src={
47+
schedule.session_image ?? 'images/all-new.png'
48+
}
4749
alt={schedule.title}
4850
/>
4951
</a>
@@ -119,7 +121,7 @@ export const SessionGridCard = ({
119121
))}
120122
</div>
121123
) : (
122-
<NoSessions />
124+
<NoSessions key={key} />
123125
))
124126
)}
125127
</div>

components/sessions/SessionListCard.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const SessionListCard = ({
2121
{Object.keys(schedules)?.map(
2222
(key, i) =>
2323
activeTab === i &&
24+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
25+
// @ts-ignore
2426
(schedules[key].length ? (
2527
<div key={key}>
2628
{schedules[key]?.map((schedule: Session) => (
@@ -96,7 +98,7 @@ const SessionListCard = ({
9698
))}
9799
</div>
98100
) : (
99-
<NoSessions />
101+
<NoSessions key={key} />
100102
))
101103
)}
102104
</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 = 'fluttercon_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.86 MB
Loading

tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"isolatedModules": true,
1515
"jsx": "preserve",
1616
"incremental": true,
17-
"suppressImplicitAnyIndexErrors": true
17+
"suppressImplicitAnyIndexErrors": true,
18+
"paths": {
19+
"react": ["./node_modules/@types/react"]
20+
}
1821
},
1922
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
2023
"exclude": ["node_modules"]

yarn.lock

+12-12
Original file line numberDiff line numberDiff line change
@@ -3106,9 +3106,9 @@ fast-levenshtein@^2.0.6:
31063106
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
31073107

31083108
fast-uri@^3.0.1:
3109-
version "3.0.2"
3110-
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024"
3111-
integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==
3109+
version "3.0.3"
3110+
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241"
3111+
integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==
31123112

31133113
fastq@^1.6.0:
31143114
version "1.17.1"
@@ -4215,9 +4215,9 @@ [email protected]:
42154215
"@next/swc-win32-x64-msvc" "12.2.0"
42164216

42174217
node-abi@^3.3.0:
4218-
version "3.69.0"
4219-
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.69.0.tgz#00111eb16210ca96233468f4f574e544b82da79f"
4220-
integrity sha512-H/k5/+HXto3xXTcqTIl3DAWaelvNVYSoZ2IJVDFJEoYyZYcoRhcRy+1WMMhsKAG+UU7wSCI3DRurJ0DxFMXvyg==
4218+
version "3.70.0"
4219+
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.70.0.tgz#f45cdea658838fe43d43eb78524cbe3aad73f8ac"
4220+
integrity sha512-xMTIZdvAyzGyxwOwxXv/8V/f/KAqKWNCeNIIFu2doEtQp9wvMUTam036At/iVtJqum6n5ljbAhUmXAUOhyivSA==
42214221
dependencies:
42224222
semver "^7.3.5"
42234223

@@ -5299,9 +5299,9 @@ supports-preserve-symlinks-flag@^1.0.0:
52995299
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
53005300

53015301
tailwindcss@^3.1.4:
5302-
version "3.4.13"
5303-
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.13.tgz#3d11e5510660f99df4f1bfb2d78434666cb8f831"
5304-
integrity sha512-KqjHOJKogOUt5Bs752ykCeiwvi0fKVkr5oqsFNt/8px/tA8scFPIlkygsf6jXrfCqGHz7VflA6+yytWuM+XhFw==
5302+
version "3.4.14"
5303+
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.14.tgz#6dd23a7f54ec197b19159e91e3bb1e55e7aa73ac"
5304+
integrity sha512-IcSvOcTRcUtQQ7ILQL5quRDg7Xs93PdJEk1ZLbhhvJc7uj/OAhYOnruEiwnGgBvUtaUAJ8/mhSw1o8L2jCiENA==
53055305
dependencies:
53065306
"@alloc/quick-lru" "^5.2.0"
53075307
arg "^5.0.2"
@@ -5447,9 +5447,9 @@ tslib@^1.8.1:
54475447
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
54485448

54495449
tslib@^2.1.0, tslib@^2.4.0:
5450-
version "2.7.0"
5451-
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
5452-
integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==
5450+
version "2.8.0"
5451+
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b"
5452+
integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==
54535453

54545454
tsutils@^3.21.0:
54555455
version "3.21.0"

0 commit comments

Comments
 (0)