6.1 Hero/공지 배너 컴포넌트(자동/수동 슬라이드) o

This commit is contained in:
koreacomp5
2025-10-09 15:39:46 +09:00
parent 75a0745342
commit b1557851ab
3 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
"use client";
import { useEffect, useState } from "react";
const defaultSlides = [
{ id: 1, title: "공지사항", subtitle: "중요 공지 확인하기" },
{ id: 2, title: "이벤트", subtitle: "진행중인 이벤트" },
];
export function HeroBanner() {
const [idx, setIdx] = useState(0);
useEffect(() => {
const t = setInterval(() => setIdx((i) => (i + 1) % defaultSlides.length), 3000);
return () => clearInterval(t);
}, []);
const slide = defaultSlides[idx];
return (
<section style={{ padding: 24, background: "#f5f5f5", borderRadius: 12, marginBottom: 16 }}>
<h1 style={{ margin: 0 }}>{slide.title}</h1>
<p style={{ margin: 0, opacity: 0.8 }}>{slide.subtitle}</p>
</section>
);
}

View File

@@ -1,9 +1,11 @@
import Image from "next/image";
import { QuickActions } from "@/app/components/QuickActions";
import { HeroBanner } from "@/app/components/HeroBanner";
export default function Home() {
return (
<div className="">
<HeroBanner />
<QuickActions />
</div>
);

View File

@@ -33,7 +33,7 @@
5.4 테마/다크모드 및 반응형 설정 o
[메인 화면]
6.1 Hero/공지 배너 컴포넌트(자동/수동 슬라이드)
6.1 Hero/공지 배너 컴포넌트(자동/수동 슬라이드) o
6.2 최근/인기 글 리스트 및 무한스크롤 연동
6.3 권한 기반 빠른 액션 노출 제어
6.4 검색 바 및 결과 페이지 라우팅