Refactor code structure for improved readability and maintainability

This commit is contained in:
Poyraz Avsever
2026-03-11 14:44:20 +03:00
parent bcbfebe5a3
commit c6d1252bb8
13 changed files with 1781 additions and 35 deletions
+1 -10
View File
@@ -8,6 +8,7 @@ import { Icon } from "@iconify/react";
import { Badge, Button, Card, Typography } from "poyraz-ui/atoms";
import { Modal, ModalContent, ModalTitle, Sheet, SheetContent, SheetTitle } from "poyraz-ui/molecules";
import type { PodcastEpisode } from "@/data/content-types";
import { getYoutubeEmbedUrl } from "@/lib/youtube";
type ContentContentProps = {
yazilimEpisodes: PodcastEpisode[];
@@ -102,16 +103,6 @@ function PdfFirstPagePreview({ src, title }: { src: string; title: string }) {
);
}
function getYoutubeEmbedUrl(link: string) {
try {
const url = new URL(link);
const videoId = url.searchParams.get("v");
return videoId ? `https://www.youtube.com/embed/${videoId}` : null;
} catch {
return null;
}
}
function PodcastColumn({
title,
subtitle,