Skip to content

Commit

Permalink
updated sessions view
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelgeek committed Oct 15, 2024
1 parent 4b174f1 commit 8f6229c
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
4 changes: 2 additions & 2 deletions components/sessions/SessionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const SessionDetails = ({ session }: { session: Session }) => {
<div className="pt-4 md:pt-6">
{session.session_image && (
<img
className="rounded-lg h-auto md:h-56"
className="rounded-lg h-auto w-full"
src={session.session_image}
alt="session"
/>
Expand Down Expand Up @@ -49,7 +49,7 @@ export const SessionDetails = ({ session }: { session: Session }) => {
<h6 className="text-primary dark:text-white-dark font-bold mt-4 md:mt-10 w-full">
Session Description:
</h6>
<p className="p gray mt-2">{session.description}</p>
<p className="p gray mt-2 break-words">{session.description}</p>

<div className="w-full justify-center md:justify-start flex flex-col mt-4 md:mt-10 mb-4 lg:mb-16">
<StarIcon isStar={false} session={session} />
Expand Down
8 changes: 5 additions & 3 deletions components/sessions/SessionGridCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const SessionGridCard = ({
{schedule.is_serviceSession ? (
<img
className="object-cover md:object-cover"
src={schedule.session_image ?? '/images/all.png'}
src={schedule.session_image ?? '/images/all-new.png'}
alt={schedule.title}
/>
) : (
Expand All @@ -43,7 +43,9 @@ export const SessionGridCard = ({
<a>
<img
className="object-cover md:object-cover"
src={schedule.session_image ?? 'images/all.png'}
src={
schedule.session_image ?? 'images/all-new.png'
}
alt={schedule.title}
/>
</a>
Expand Down Expand Up @@ -119,7 +121,7 @@ export const SessionGridCard = ({
))}
</div>
) : (
<NoSessions />
<NoSessions key={key} />
))
)}
</div>
Expand Down
4 changes: 3 additions & 1 deletion components/sessions/SessionListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const SessionListCard = ({
{Object.keys(schedules)?.map(
(key, i) =>
activeTab === i &&
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
(schedules[key].length ? (
<div key={key}>
{schedules[key]?.map((schedule: Session) => (
Expand Down Expand Up @@ -96,7 +98,7 @@ const SessionListCard = ({
))}
</div>
) : (
<NoSessions />
<NoSessions key={key} />
))
)}
</div>
Expand Down
12 changes: 6 additions & 6 deletions components/sessions/SessionToggles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ export const SessionToggles: NextPage<SessionPageProps> = ({

return (
<div className="space-x-4 md:space-x-8 w-full md:w-1/3 flex justify-end items-center">
<button type="button" onClick={() => onChangeViewType(false)}>
<button type="button" onClick={() => onChangeViewType(true)}>
<i
className={`fa fa-th-list text-2xl ${
isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
className={`fa fa-th text-2xl ${
!isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
}`}
/>
</button>
<button type="button" onClick={() => onChangeViewType(true)}>
<button type="button" onClick={() => onChangeViewType(false)}>
<i
className={`fa fa-th text-2xl ${
!isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
className={`fa fa-th-list text-2xl ${
isGridView ? 'text-white dark:text-white-dark' : 'text-secondary'
}`}
/>
</button>
Expand Down
2 changes: 1 addition & 1 deletion hooks/useSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const MY_SESSIONS = 'fluttercon_my_sessions'

export const useSession = ({ allSchedules }: { allSchedules: Schedule[] }) => {
const [showFilterSession, setShowFilterSession] = useState(false)
const [isGridView, setIsGridView] = useState(false)
const [isGridView, setIsGridView] = useState(true)
const [activeTab, setActiveTab] = useState(0)
const [showMySessions, setShowMysessions] = useState(false)
const [loading, setLoading] = useState(false)
Expand Down
Binary file added public/images/all-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"suppressImplicitAnyIndexErrors": true
"suppressImplicitAnyIndexErrors": true,
"paths": {
"react": ["./node_modules/@types/react"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3106,9 +3106,9 @@ fast-levenshtein@^2.0.6:
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==

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

fastq@^1.6.0:
version "1.17.1"
Expand Down Expand Up @@ -4215,9 +4215,9 @@ [email protected]:
"@next/swc-win32-x64-msvc" "12.2.0"

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

Expand Down Expand Up @@ -5299,9 +5299,9 @@ supports-preserve-symlinks-flag@^1.0.0:
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==

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

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

tsutils@^3.21.0:
version "3.21.0"
Expand Down

0 comments on commit 8f6229c

Please sign in to comment.