Skip to content

Commit

Permalink
fix/290: [bug] course responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
pkmanas22 committed Mar 29, 2024
1 parent 76a0a4b commit b95f0f0
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 23 deletions.
33 changes: 33 additions & 0 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,39 @@ async function main() {
openToEveryone: false,
slug: 'test-course-2',
},
{
id: 3,
appxCourseId: 2,
discordRoleId: '3',
title: 'test course 2',
imageUrl:
'https://appx-recordings.s3.ap-south-1.amazonaws.com/drm/100x/images/test2.png',
description: 'test course 2',
openToEveryone: false,
slug: 'test-course-2',
},
{
id: 4,
appxCourseId: 2,
discordRoleId: '3',
title: 'test course 2',
imageUrl:
'https://appx-recordings.s3.ap-south-1.amazonaws.com/drm/100x/images/test2.png',
description: 'test course 2',
openToEveryone: false,
slug: 'test-course-2',
},
{
id: 5,
appxCourseId: 2,
discordRoleId: '3',
title: 'test course 2',
imageUrl:
'https://appx-recordings.s3.ap-south-1.amazonaws.com/drm/100x/images/test2.png',
description: 'test course 2',
openToEveryone: false,
slug: 'test-course-2',
},
],
});

Expand Down
2 changes: 1 addition & 1 deletion src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const CourseCard = ({
}) => {
return (
<div
className="max-w-sm bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700"
className="max-w-sm bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700 mx-auto w-full"
onClick={() => {
onClick();
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Courses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Courses = ({ courses }: { courses: Course[] }) => {
const router = useRouter();
return (
<section className="flex flex-col items-center w-full">
<div className="max-w-screen-xl w-full mx-auto py-6 px-6 cursor-pointer grid grid-cols-1 gap-5 md:grid-cols-3">
<div className="max-w-screen-xl w-full mx-auto py-6 px-6 cursor-pointer grid grid-cols-1 gap-5 md:grid-cols-3 sm:grid-cols-2">
{courses?.map((course) => (
<CourseCard
key={course.id}
Expand Down
10 changes: 7 additions & 3 deletions src/components/VideoPlayer2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
player.volume(0);
}
event.stopPropagation();
break;
break;
case 'KeyK': // 'K' key for play/pause toggle
if (player.paused()) {
player.play();
Expand All @@ -169,11 +169,15 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
event.stopPropagation();
break;
case 'KeyJ': // 'J' key for seeking backward 10 seconds multiplied by the playback rate
player.currentTime(player.currentTime() - (10 * player.playbackRate()));
player.currentTime(
player.currentTime() - 10 * player.playbackRate(),
);
event.stopPropagation();
break;
case 'KeyL': // 'L' key for seeking forward 10 seconds multiplied by the playback rate
player.currentTime(player.currentTime() + (10 * player.playbackRate()));
player.currentTime(
player.currentTime() + 10 * player.playbackRate(),
);
event.stopPropagation();
break;
}
Expand Down
24 changes: 6 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,10 @@
resolved "https://registry.npmjs.org/@icons-pack/react-simple-icons/-/react-simple-icons-9.4.0.tgz"
integrity sha512-fZtC4Zv53hE+IQE2dJlFt3EB6UOifwTrUNMuEu4hSXemtqMahd05Dpvj2K0j2ewVc+j/ibavud3xjfaMB2Nj7g==

"@img/sharp-darwin-arm64@0.33.2":
"@img/sharp-win32-x64@0.33.2":
version "0.33.2"
resolved "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.2.tgz"
integrity sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==
optionalDependencies:
"@img/sharp-libvips-darwin-arm64" "1.0.1"

"@img/[email protected]":
version "1.0.1"
resolved "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.1.tgz"
integrity sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw==
resolved "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.2.tgz"
integrity sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg==

"@isaacs/cliui@^8.0.2":
version "8.0.2"
Expand Down Expand Up @@ -383,10 +376,10 @@
resolved "https://registry.npmjs.org/@next/env/-/env-14.0.2.tgz"
integrity sha512-HAW1sljizEaduEOes/m84oUqeIDAUYBR1CDwu2tobNlNDFP3cSm9d6QsOsGeNlIppU1p/p1+bWbYCbvwjFiceA==

"@next/swc-darwin-arm64@14.0.2":
"@next/swc-win32-x64-msvc@14.0.2":
version "14.0.2"
resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.2.tgz"
integrity sha512-i+jQY0fOb8L5gvGvojWyZMfQoQtDVB2kYe7fufOEiST6sicvzI2W5/EXo4lX5bLUjapHKe+nFxuVv7BA+Pd7LQ==
resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.2.tgz"
integrity sha512-Ut4LXIUvC5m8pHTe2j0vq/YDnTEyq6RSR9vHYPqnELrDapPhLNz9Od/L5Ow3J8RNDWpEnfCiQXuVdfjlNEJ7ug==

"@nodelib/[email protected]":
version "2.1.5"
Expand Down Expand Up @@ -2216,11 +2209,6 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
Expand Down

0 comments on commit b95f0f0

Please sign in to comment.