This commit is contained in:
focp212@naver.com
2025-10-14 19:37:48 +09:00
parent 85fb8cae49
commit 1a80048f77
4 changed files with 54 additions and 23 deletions

View File

@@ -5,22 +5,42 @@ import {
useSetHeaderType,
useSetFooterMode
} from '@/widgets/sub-layout/use-sub-layout';
import { useState } from 'react';
export const ListPage = () => {
useSetHeaderTitle('알림함');
useSetHeaderType(HeaderType.LeftArrow);
useSetFooterMode(false);
const [category, setCategory] = useState<string>('all');
let btnList = [
{name: '전체', category: 'all'},
{name: '혜택/이벤트', category: 'event'},
{name: '공지사항', category: 'notice'}
];
const onClickToCategory = (value: any) => {
setCategory(value.category);
};
return (
<>
<main className="pop">
<div className="sub-wrap">
<div className="notice-tabs">
<button className="tab36 on"></button>
<button className="tab36">/</button>
<button className="tab36"></button>
{
btnList.map((value, index) => (
<button
className={ `tab36 ${(category === value.category)? 'on': ''}`}
onClick={ () => onClickToCategory(value) }
>{ value.name }</button>
))
}
</div>
<AlarmList></AlarmList>
<AlarmList
category={ category }
></AlarmList>
</div>
</main>
</>