Skip to content

Commit

Permalink
feat: 업로드 이후 화면 경로 초기화면 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyuHoi committed Nov 15, 2024
1 parent ed063fe commit a143b31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/auto/components/final/FinalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import { Button, Spinner } from '@/components';

import { fetchVideoExtract, postHighlightSelection } from '@/pages/auto/apis';
import { InitBtn } from '@/pages/auto/components';
import { useProcessContext } from '@/pages/auto/provider';

import ConvertShorts from './ConvertShorts';

const FinalView = () => {
const [selectedIndex, setSelectedIndex] = useState<number | null>(null);
const [isLoading, setIsLoading] = useState<boolean>(false);
const { setProcessState } = useProcessContext();

const handleSelectVideo = (index: number) => {
setSelectedIndex(index);
Expand Down Expand Up @@ -56,7 +58,9 @@ const FinalView = () => {
anchor.download = 'video.mp4'; // 다운로드 파일명 설정
anchor.click();

alert('비디오 업로드 성공');
alert('비디오 업로드 성공, 초기화면으로 이동합니다.');
setProcessState('initial');
window.location.href = '/';
} catch (error) {
console.error('Error uploading video:', error);
alert('업로드 중 오류가 발생했습니다.');
Expand Down

0 comments on commit a143b31

Please sign in to comment.