feat(legacy): 💄 add recommendation for our AI course#478
feat(legacy): 💄 add recommendation for our AI course#478BleedingDev wants to merge 5 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WIP: Needs changing main video
93e43db to
57ca4f9
Compare
bc26872 to
e44eaff
Compare
5d4477b to
6a372f4
Compare
There was a problem hiding this comment.
Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.
Files not reviewed (3)
- apps/legacy_nmit/package.json: Language not supported
- apps/legacy_nmit/pages/_document.tsx: Language not supported
- apps/legacy_nmit/pages/chapter/[post].tsx: Evaluated as low risk
Comments suppressed due to low confidence (1)
apps/legacy_nmit/pages/dashboard.tsx:49
- Ensure that the new behavior introduced by the
MissingBannercomponent is covered by tests.
<MissingBanner />
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <p className="text-gray-600"> | ||
| <iframe className='w-full aspect-video' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> | ||
| </p> |
There was a problem hiding this comment.
The <p> element should not contain an <iframe> as its child. According to HTML semantics, <p> elements should only contain phrasing content (inline elements), not embedded content like iframes.
Remove the <p> wrapper:
<div className="mt-4">
<iframe className='w-full aspect-video' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />
</div>| <p className="text-gray-600"> | |
| <iframe className='w-full aspect-video' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> | |
| </p> | |
| <iframe className='w-full aspect-video' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> |
| </Dialog.Close> | ||
| <Dialog.Title className="text-lg font-semibold"> | ||
| AI Kurz | ||
| </Dialog.Title> |
There was a problem hiding this comment.
Missing Dialog.Description for accessibility. Radix UI Dialog components should include a description for screen readers to properly announce the modal content.
Add a description after the title:
<Dialog.Title className="text-lg font-semibold">
AI Kurz
</Dialog.Title>
<Dialog.Description className="sr-only">
Podívejte se na naše video o AI kurzu a přihlaste se
</Dialog.Description>If you want to keep the description visible, remove sr-only class.
| </Dialog.Title> | |
| </Dialog.Title> | |
| <Dialog.Description className="sr-only"> | |
| Podívejte se na naše video o AI kurzu a přihlaste se | |
| </Dialog.Description> |
| useEffect(() => { | ||
| if (router.asPath.startsWith("/kurz-ai")) { | ||
| setTimeout(handleClose, 500) | ||
| } | ||
| }, [router.asPath]) |
There was a problem hiding this comment.
This useEffect has multiple issues:
- Missing cleanup for
setTimeout- can cause memory leaks and unexpected behavior - Missing
handleClosein dependency array - can lead to stale closures
Fix both issues:
useEffect(() => {
const cleanup = () => {
document.cookie = `${MODAL_COOKIE_KEY}=true; path=/; max-age=${60 * 60 * 24 * 365}; SameSite=Lax`
setIsOpen(false)
}
if (router.asPath.startsWith("/kurz-ai")) {
const timeoutId = setTimeout(cleanup, 500)
return () => clearTimeout(timeoutId)
}
}, [router.asPath])Alternatively, wrap handleClose with useCallback and include it in the dependency array.
|
|
||
| <div className="mt-4"> | ||
| <p className="text-gray-600"> | ||
| <iframe className='w-full aspect-video' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> |
There was a problem hiding this comment.
The frameBorder attribute is deprecated in HTML5. Use the CSS border property instead or remove this attribute as modern browsers default to no border for iframes.
Replace frameBorder="0" with inline style or CSS class:
<iframe className='w-full aspect-video border-0' ... />| <iframe className='w-full aspect-video' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> | |
| <iframe className='w-full aspect-video border-0' src="https://www.youtube.com/embed/ZXB3XTZRtdk" title="Pozvánka na AI kurz" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> |
feat(legacy): 💄 add recommendation for our AI course
WIP: Needs changing main video
This reverts banner feature commits.