Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix https
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Tukachev committed Jan 26, 2023
1 parent 888a177 commit 9e47e35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Suspense } from 'react'
import { env } from '~/env/server.mjs'
import { getBlockRecordMap, getBlocktData, getData, getSocialsData } from '~/utils/data'
import { ClientComponent } from './client'
import { type IconName, Icons } from './icons'
Expand Down Expand Up @@ -121,7 +122,7 @@ async function BlockContent({ id }: { id: string }) {
if (src.includes('youtube')) {
const url = new URL(src)
const id = url.searchParams.get('v')
if (id) src = `http://www.youtube.com/embed/${id}`
if (id) src = `http${env.NODE_ENV === 'production' ? 's' : ''}://www.youtube.com/embed/${id}`
}
return (
<div key={block.id} className="relative aspect-video w-full">
Expand Down

1 comment on commit 9e47e35

@vercel
Copy link

@vercel vercel bot commented on 9e47e35 Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.