feat: add YouTube embedded player (#460)

Co-authored-by: Daniel  Vergara <daniel.omar.vergara@gmail.com>
This commit is contained in:
Cody Tseng 2025-07-30 10:55:11 +08:00 committed by GitHub
parent 830362b941
commit 5a28233856
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 191 additions and 10 deletions

View file

@ -7,6 +7,7 @@ import Image from '../Image'
export default function WebPreview({ url, className }: { url: string; className?: string }) {
const { isSmallScreen } = useScreenSize()
const { title, description, image } = useFetchWebMetadata(url)
const hostname = useMemo(() => {
try {
return new URL(url).hostname