Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/feature/album/4cut/components/ScreenAlbum4Cut.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useQueryClient } from '@tanstack/react-query';
import { Download, Loader2, LucideIcon, Menu, Send } from 'lucide-react';
import dynamic from 'next/dynamic';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useEffect, useRef, useState } from 'react';
import { useGetAlbumInfo } from '../../detail/hooks/useGetAlbumInfo';
import { use4CutAiSummary } from '../hooks/use4CutAiSummary';
Expand All @@ -37,11 +38,22 @@ interface ScreenAlbum4CutProps {
}

export default function ScreenAlbum4Cut({ albumId }: ScreenAlbum4CutProps) {
const router = useRouter();
const queryClient = useQueryClient();
const [isCaptureVisible, setIsCaptureVisible] = useState(false);
const [isDownloading, setIsDownloading] = useState(false);
const [showExplanation, setShowExplanation] = useState(false);
const captureRef = useRef<HTMLDivElement>(null);

const handleBackClick = () => {
if (typeof window === 'undefined') return;
const isNewTab = window.history.length <= 1 || !document.referrer;
if (isNewTab) {
router.push('/main');
} else {
router.back();
}
};
Comment thread
dasosann marked this conversation as resolved.
const { data } = useGetAlbumInfo(albumId);
const { data: albumInformData } = useGetAlbumInform({ code: albumId });
const { data: { name } = {} } = useGetUserMe();
Expand Down Expand Up @@ -201,6 +213,7 @@ export default function ScreenAlbum4Cut({ albumId }: ScreenAlbum4CutProps) {
<>
<CustomHeader
isShowBack
onBackClick={handleBackClick}
title={data?.title ?? ''}
rightContent={
<div className='flex gap-4'>
Expand Down
Loading