import { MemeCard } from '@/components/custom/meme-card'; import EditorSkeleton from '@/components/editor/EditorSkeleton'; import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@/components/ui/breadcrumb'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { KeywordBadge } from '@/components/ui/keyword-badge'; import Footer from '@/pages/home/partials/Footer'; import { Link } from '@inertiajs/react'; import { ArrowLeft } from 'lucide-react'; import { useEffect, useState } from 'react'; import { route } from 'ziggy-js'; import BrandLogo from '../home/partials/BrandLogo'; interface MemeMedia { ids: string; name: string; description: string; keywords: string[]; action_keywords: string[]; emotion_keywords: string[]; misc_keywords: string[]; mov_url: string; webm_url: string; gif_url: string; webp_url: string; slug: string; } interface Props { meme: MemeMedia; relatedMemes: MemeMedia[]; } export default function MemeShow({ meme, relatedMemes }: Props) { const [isClient, setIsClient] = useState(false); const [Editor, setEditor] = useState(null); useEffect(() => { setIsClient(true); // Dynamically import Editor only on client-side to avoid SSR issues with Konva if (typeof window !== 'undefined') { import('@/modules/editor/editor.jsx').then((module) => { setEditor(() => module.default); }); } }, []); const allKeywords = [ ...(meme.keywords || []), ...(meme.action_keywords || []), ...(meme.emotion_keywords || []), ...(meme.misc_keywords || []), ].filter(Boolean); return ( <>
{/* Breadcrumbs */} Home Meme Library {meme.name}

{meme.name} Meme

Use our video meme editor to customise your {meme.name} meme and export as MP4 video in minutes!

{isClient && Editor ? ( setMeme(meme)} //setInitialBackground={(setBackground) => setBackground(null)} setInitialText={(setText) => setText('add your meme caption here')} /> ) : ( )}
{/* Keywords */} Know Your Meme Description: {meme.description && (

{meme.description}

)}
{allKeywords.map((keyword, index) => ( ))}
{/* Related Memes */}
{relatedMemes.length > 0 && ( Related Memes Similar meme templates you might like
{relatedMemes.map((related) => ( ))}
)}
{/* Back to Meme Library Button */}
); }