Skip to content

Commit

Permalink
Updated bunnyUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
hkirat committed Aug 14, 2024
1 parent bbb19be commit 51df739
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app/admin/content/[courseId]/[...moduleId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default async function UpdateCourseContent({
if (contentType === 'video') {
return (
<div className="mx-auto max-w-screen-xl justify-between p-4 text-white">
{/* @ts-ignore */}
<UpdateVideoClient content={courseContent[0]} />
</div>
);
Expand All @@ -47,6 +48,7 @@ export default async function UpdateCourseContent({
/>
<AdminCourseContent
rest={rest}
// @ts-ignore
courseContent={courseContent?.map((x: any) => ({
title: x?.title || '',
image: x?.thumbnail || '',
Expand Down
1 change: 1 addition & 0 deletions src/app/admin/content/[courseId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default async function UpdateCourseContent({
/>
<AdminCourseContent
rest={rest}
// @ts-ignore
courseContent={courseContent?.map((x: any) => ({
title: x?.title || '',
image: x?.thumbnail || '',
Expand Down
3 changes: 2 additions & 1 deletion src/components/admin/ContentRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { authOptions } from '@/lib/auth';
import { ContentRendererClient } from './ContentRendererClient';
import { Bookmark } from '@prisma/client';

function bunnyUrl(url: string) {
function bunnyUrl(url?: string) {
if (!url) return '';
return url
.replace('https://appxcontent.kaxa.in', 'https://appxcontent.b-cdn.net')
.replace(
Expand Down

0 comments on commit 51df739

Please sign in to comment.