Skip to content

Commit

Permalink
fix: 유튜브 시연영상으로 redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
WooDaeHyun committed Jun 30, 2023
1 parent 68f774a commit 0e47a1f
Show file tree
Hide file tree
Showing 2 changed files with 7,546 additions and 7,718 deletions.
17 changes: 17 additions & 0 deletions src/post/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
import { useEffect } from 'react';
import ErrorBoundary from '../api/ErrorBoundary';
import Search from '../search/Index';
import { useLocation, useNavigate } from 'react-router-dom';

function Post() {
const location = useLocation();
const currentPath = location.pathname;
const navigate = useNavigate();
const videoUrl = 'https://youtu.be/gS8CALiBvEM';

console.log(currentPath);
console.log(navigate);

useEffect(() => {
if (currentPath === '/') {
window.location.href = videoUrl;
}
}, []);

return (
<>
<ErrorBoundary>
Expand Down
Loading

0 comments on commit 0e47a1f

Please sign in to comment.