타임라인 리디렉션 컴포넌트를 통합하여 코드 정리 및 사용자 경험 개선

This commit is contained in:
imnyang 2025-05-12 00:48:07 +09:00
commit 8f14d084a6
3 changed files with 36 additions and 15 deletions

View file

@ -1,9 +1,16 @@
import "../index.css";
import { BrowserRouter, Routes, Route } from "react-router";
import { Page } from "./page";
import RedirectTimeline from "./utils/RedirectTimeline";
import NotFound from "./utils/NotFound";
import { ThemeProvider } from "@/components/theme-provider";
import { useEffect } from "react";
import { useNavigate } from "react-router";
function TimelineRedirect() {
const navigate = useNavigate();
useEffect(() => { navigate("/#timeline"); }, [navigate]);
return null;
}
export default function App() {
return (
@ -11,7 +18,7 @@ export default function App() {
<BrowserRouter>
<Routes>
<Route path="/" element={<Page />} />
<Route path="/timeline" element={<RedirectTimeline />} />
<Route path="/timeline" element={<TimelineRedirect />} />
<Route path="/*" element={<NotFound />} />
</Routes>
</BrowserRouter>

View file

@ -68,10 +68,30 @@ export function Page() {
<picture className="block bg-gray-100 my-4 rounded-xl aspect-3-2 overflow-hidden image-scale object-shadowed">
<img src={Image} className="w-full aspect-3-2 object-cover object-center" />
</picture>
<p>
{age} <span className="font-extrabold"> </span> {" "}
<span className="font-extrabold"> </span> <span className="font-extrabold"> </span> .
<p className="mt-6">
{age} , <span className="font-extrabold text-white"> </span> ,<br />
<span className="font-extrabold text-white"> </span> .<br />
<span className="font-extrabold text-white"> </span> .
</p>
<p className="mt-2">
<span className="font-extrabold text-white"></span> ,
<span className="font-extrabold text-white"></span> .<br />
4 <span className="font-extrabold text-white">Python</span> ,
<span className="font-extrabold text-white">TypeScript</span> .<br />
<span className="font-extrabold text-white"> </span> .
</p>
<div className="flex flex-row items-center justify-center p-4 bg-muted rounded-xl shadow-md mt-6">
<img
loading="lazy"
decoding="async"
src="https://skillicons.dev/icons?i=typescript,js,c,cpp,rust,go,java,kotlin,py,html,css,php,react,remix,nextjs,tailwind,tauri,bun,elysia,mongodb,postgres,sqlite,docker,nginx,github,githubactions,git,arduino,raspberrypi,bots"
className="w-full max-w-3xl rounded-lg object-contain select-none pointer-events-none transition-transform duration-200 hover:scale-105"
alt="기술 스택"
title="기술 스택"
width={800}
/>
</div>
<br />
@ -82,7 +102,11 @@ export function Page() {
</a>
</p>
<div className="border-t-1 border-muted rounded-full my-4" />
<Timeline />
<div className="border-t-1 border-muted rounded-full mt-8" />
<Contact />
</div>
</div>

View file

@ -1,10 +0,0 @@
import { useEffect } from "react";
import { useNavigate } from "react-router";
export default function RedirectTimeline() {
const navigate = useNavigate();
useEffect(() => {
navigate("/#timeline");
}, [navigate]);
return (<></>)
}