@daeryun/dr_components 1.1.27 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/page/Broadcast/BroadcastList.jsx +2 -2
- package/dist/components/page/Broadcast/BroadcastList.tsx +2 -2
- package/dist/components/page/Notice/NoticeList.d.ts +50 -0
- package/dist/components/page/Notice/NoticeList.jsx +125 -0
- package/dist/components/page/Notice/NoticeList.stories.d.ts +9 -0
- package/dist/components/page/Notice/NoticeList.stories.jsx +259 -0
- package/dist/components/page/Notice/NoticeList.stories.tsx +277 -0
- package/dist/components/page/Notice/NoticeList.tsx +265 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.js +1 -0
- package/dist/components/page/index.ts +1 -0
- package/dist/styles/globals.css +79 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import NoticeList from './NoticeList';
|
|
3
|
+
import { NextRouter } from 'next/router';
|
|
4
|
+
|
|
5
|
+
const mockRouter: Partial<NextRouter> = {
|
|
6
|
+
push: (url: string) => {
|
|
7
|
+
console.log('Router push:', url);
|
|
8
|
+
return Promise.resolve(true);
|
|
9
|
+
},
|
|
10
|
+
pathname: '/notice',
|
|
11
|
+
query: {},
|
|
12
|
+
asPath: '/notice'
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const meta: Meta<typeof NoticeList> = {
|
|
16
|
+
title: 'NoticeList',
|
|
17
|
+
component: NoticeList,
|
|
18
|
+
argTypes: {
|
|
19
|
+
SearchBarProps: {
|
|
20
|
+
description: '검색바 관련 props'
|
|
21
|
+
},
|
|
22
|
+
PaginationProps: {
|
|
23
|
+
description: '페이지네이션 관련 props'
|
|
24
|
+
},
|
|
25
|
+
noticeName: {
|
|
26
|
+
description: '공지사항 카테고리 목록'
|
|
27
|
+
},
|
|
28
|
+
noticeList: {
|
|
29
|
+
description: '공지사항 목록 데이터'
|
|
30
|
+
},
|
|
31
|
+
nameFilter: {
|
|
32
|
+
description: '현재 선택된 필터'
|
|
33
|
+
},
|
|
34
|
+
search: {
|
|
35
|
+
description: '현재 검색어'
|
|
36
|
+
},
|
|
37
|
+
indexOfFirstPost: {
|
|
38
|
+
description: '현재 페이지의 첫 번째 게시물 인덱스'
|
|
39
|
+
},
|
|
40
|
+
indexOfLastPost: {
|
|
41
|
+
description: '현재 페이지의 마지막 게시물 인덱스'
|
|
42
|
+
},
|
|
43
|
+
postPerPage: {
|
|
44
|
+
description: '페이지당 게시물 수'
|
|
45
|
+
},
|
|
46
|
+
currentPage: {
|
|
47
|
+
description: '현재 페이지 번호'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default meta;
|
|
53
|
+
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
|
|
56
|
+
// Mock 데이터
|
|
57
|
+
const mockNoticeName = [
|
|
58
|
+
{
|
|
59
|
+
code: 'N0001',
|
|
60
|
+
code_name: '사무소안내',
|
|
61
|
+
code_desc: null,
|
|
62
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
63
|
+
creator: 'jeonghansol',
|
|
64
|
+
en_name: null,
|
|
65
|
+
etc: null,
|
|
66
|
+
etc2: null,
|
|
67
|
+
g_sorting: null,
|
|
68
|
+
gubun: null,
|
|
69
|
+
i_sorting: null,
|
|
70
|
+
kr_name: null,
|
|
71
|
+
modified_at: null,
|
|
72
|
+
modifier: null,
|
|
73
|
+
parent_code: 'notice',
|
|
74
|
+
sorting: 1,
|
|
75
|
+
use_bool: true
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
code: 'N0002',
|
|
79
|
+
code_name: '인사/동정',
|
|
80
|
+
code_desc: null,
|
|
81
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
82
|
+
creator: 'jeonghansol',
|
|
83
|
+
en_name: null,
|
|
84
|
+
etc: null,
|
|
85
|
+
etc2: null,
|
|
86
|
+
g_sorting: null,
|
|
87
|
+
gubun: null,
|
|
88
|
+
i_sorting: null,
|
|
89
|
+
kr_name: null,
|
|
90
|
+
modified_at: null,
|
|
91
|
+
modifier: null,
|
|
92
|
+
parent_code: 'notice',
|
|
93
|
+
sorting: 2,
|
|
94
|
+
use_bool: true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
code: 'N0003',
|
|
98
|
+
code_name: '업무협약',
|
|
99
|
+
code_desc: null,
|
|
100
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
101
|
+
creator: 'jeonghansol',
|
|
102
|
+
en_name: null,
|
|
103
|
+
etc: null,
|
|
104
|
+
etc2: null,
|
|
105
|
+
g_sorting: null,
|
|
106
|
+
gubun: null,
|
|
107
|
+
i_sorting: null,
|
|
108
|
+
kr_name: null,
|
|
109
|
+
modified_at: null,
|
|
110
|
+
modifier: null,
|
|
111
|
+
parent_code: 'notice',
|
|
112
|
+
sorting: 3,
|
|
113
|
+
use_bool: true
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
code: 'N0004',
|
|
117
|
+
code_name: '기타소식',
|
|
118
|
+
code_desc: null,
|
|
119
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
120
|
+
creator: 'jeonghansol',
|
|
121
|
+
en_name: null,
|
|
122
|
+
etc: null,
|
|
123
|
+
etc2: null,
|
|
124
|
+
g_sorting: null,
|
|
125
|
+
gubun: null,
|
|
126
|
+
i_sorting: null,
|
|
127
|
+
kr_name: null,
|
|
128
|
+
modified_at: null,
|
|
129
|
+
modifier: null,
|
|
130
|
+
parent_code: 'notice',
|
|
131
|
+
sorting: 4,
|
|
132
|
+
use_bool: true
|
|
133
|
+
}
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
const mockNoticeList = [
|
|
137
|
+
{
|
|
138
|
+
id: 5734,
|
|
139
|
+
title: '10월 3일~9일 연휴 법률상담 정상운영 공지',
|
|
140
|
+
summary:
|
|
141
|
+
'안녕하세요, 법무법인(유한) 대륜입니다.대륜은 개천절, 추석, 한글날에도 아래 일정과 같이…무소 운영으로 접근성 제고 📞아래 이미지를 클릭하시면 법률상담 접수페이지로 이동합니다.',
|
|
142
|
+
code_name: '기타소식',
|
|
143
|
+
top_count: 0
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 5703,
|
|
147
|
+
title: '법무법인 대륜 변관훈변호사, 대한변호사협회 형사전문변호사에 이어 민사전문변호사 등록',
|
|
148
|
+
summary:
|
|
149
|
+
'대한변호사협회 등록 민사전문변호사… 솔루션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
|
|
150
|
+
code_name: '인사/동정',
|
|
151
|
+
top_count: 0
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 5702,
|
|
155
|
+
title: '법무법인 대륜 변관훈변호사 대한변호사협회 형사전문변호사 등록',
|
|
156
|
+
summary:
|
|
157
|
+
'대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
|
|
158
|
+
code_name: '인사/동정',
|
|
159
|
+
top_count: 0
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 5688,
|
|
163
|
+
title: '법무법인 대륜 이동근변호사 대한변호사협회 형사전문변호사 등록',
|
|
164
|
+
summary:
|
|
165
|
+
'대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
|
|
166
|
+
code_name: '인사/동정',
|
|
167
|
+
top_count: 0
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 5687,
|
|
171
|
+
title: '이동근 前 경찰 영입',
|
|
172
|
+
summary:
|
|
173
|
+
'경찰 경력 이동근 책임총괄변호사 영입…울산지방경찰청 경위울산남부경찰서 경위경찰교육원하나은행한국어린이집총연합회 사내변호사',
|
|
174
|
+
code_name: '인사/동정',
|
|
175
|
+
top_count: 0
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
// 기본 스토리
|
|
180
|
+
export const Default: Story = {
|
|
181
|
+
args: {
|
|
182
|
+
SearchBarProps: {
|
|
183
|
+
searchInput: '',
|
|
184
|
+
handleSearch: () => console.log('검색 실행'),
|
|
185
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
186
|
+
},
|
|
187
|
+
PaginationProps: {
|
|
188
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
189
|
+
totalCount: mockNoticeList.length,
|
|
190
|
+
currentPage: 1
|
|
191
|
+
},
|
|
192
|
+
noticeName: mockNoticeName,
|
|
193
|
+
noticeList: mockNoticeList,
|
|
194
|
+
nameFilter: { code_name: '전체', code: '' },
|
|
195
|
+
search: '',
|
|
196
|
+
indexOfFirstPost: 1,
|
|
197
|
+
indexOfLastPost: 10,
|
|
198
|
+
postPerPage: 10,
|
|
199
|
+
currentPage: 1,
|
|
200
|
+
router: mockRouter
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// 검색어가 있는 상태
|
|
205
|
+
export const WithSearch: Story = {
|
|
206
|
+
args: {
|
|
207
|
+
SearchBarProps: {
|
|
208
|
+
searchInput: '법무법인',
|
|
209
|
+
handleSearch: () => console.log('검색 실행'),
|
|
210
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
211
|
+
},
|
|
212
|
+
PaginationProps: {
|
|
213
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
214
|
+
totalCount: mockNoticeList.length,
|
|
215
|
+
currentPage: 1
|
|
216
|
+
},
|
|
217
|
+
noticeName: mockNoticeName,
|
|
218
|
+
noticeList: mockNoticeList,
|
|
219
|
+
nameFilter: { code_name: '전체', code: '' },
|
|
220
|
+
search: '법무법인',
|
|
221
|
+
indexOfFirstPost: 1,
|
|
222
|
+
indexOfLastPost: 10,
|
|
223
|
+
postPerPage: 10,
|
|
224
|
+
currentPage: 1,
|
|
225
|
+
router: mockRouter
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// 필터가 선택된 상태
|
|
230
|
+
export const WithFilter: Story = {
|
|
231
|
+
args: {
|
|
232
|
+
SearchBarProps: {
|
|
233
|
+
searchInput: '',
|
|
234
|
+
handleSearch: () => console.log('검색 실행'),
|
|
235
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
236
|
+
},
|
|
237
|
+
PaginationProps: {
|
|
238
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
239
|
+
totalCount: mockNoticeList.length,
|
|
240
|
+
currentPage: 1
|
|
241
|
+
},
|
|
242
|
+
noticeName: mockNoticeName,
|
|
243
|
+
noticeList: mockNoticeList,
|
|
244
|
+
nameFilter: { code_name: '사무소안내', code: 'N0001' },
|
|
245
|
+
search: '',
|
|
246
|
+
indexOfFirstPost: 1,
|
|
247
|
+
indexOfLastPost: 10,
|
|
248
|
+
postPerPage: 10,
|
|
249
|
+
currentPage: 1,
|
|
250
|
+
router: mockRouter
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
// 빈 목록 상태
|
|
255
|
+
export const EmptyList: Story = {
|
|
256
|
+
args: {
|
|
257
|
+
SearchBarProps: {
|
|
258
|
+
searchInput: '',
|
|
259
|
+
handleSearch: () => console.log('검색 실행'),
|
|
260
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
261
|
+
},
|
|
262
|
+
PaginationProps: {
|
|
263
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
264
|
+
totalCount: 0,
|
|
265
|
+
currentPage: 1
|
|
266
|
+
},
|
|
267
|
+
noticeName: mockNoticeName,
|
|
268
|
+
noticeList: [],
|
|
269
|
+
nameFilter: { code_name: '전체', code: '' },
|
|
270
|
+
search: '',
|
|
271
|
+
indexOfFirstPost: 1,
|
|
272
|
+
indexOfLastPost: 10,
|
|
273
|
+
postPerPage: 10,
|
|
274
|
+
currentPage: 1,
|
|
275
|
+
router: mockRouter
|
|
276
|
+
}
|
|
277
|
+
};
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
// 스토리북용 전역 타입 선언
|
|
6
|
+
declare global {
|
|
7
|
+
interface Window {
|
|
8
|
+
next?: {
|
|
9
|
+
router?: any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
import Link from 'next/link';
|
|
14
|
+
import PageWrapper from '../../Layout/PageWrapper';
|
|
15
|
+
import SearchBar from '../../SearchBar/SearchBar';
|
|
16
|
+
// 공지사항 데이터 타입 정의
|
|
17
|
+
interface INoticeTypes {
|
|
18
|
+
id: number;
|
|
19
|
+
title: string;
|
|
20
|
+
summary: string;
|
|
21
|
+
code_name: string;
|
|
22
|
+
top_count?: number;
|
|
23
|
+
timestamp?: string;
|
|
24
|
+
}
|
|
25
|
+
import Pagination from '../../Pagination/Pagination';
|
|
26
|
+
|
|
27
|
+
interface ISearchBarProps {
|
|
28
|
+
handleInputChange: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
29
|
+
handleSearch: () => void;
|
|
30
|
+
searchInput: string;
|
|
31
|
+
}
|
|
32
|
+
interface IPaginationProps {
|
|
33
|
+
onPaginationChange: (pageNum: number) => void;
|
|
34
|
+
currentPage: number;
|
|
35
|
+
totalCount: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface NoticeListProps {
|
|
39
|
+
SearchBarProps: ISearchBarProps;
|
|
40
|
+
PaginationProps: IPaginationProps;
|
|
41
|
+
noticeName: {
|
|
42
|
+
code: string;
|
|
43
|
+
code_name: string | null;
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}[];
|
|
46
|
+
noticeList: INoticeTypes[];
|
|
47
|
+
currentCodeDesc?: string;
|
|
48
|
+
isUseHeaderComponent?: boolean;
|
|
49
|
+
nameFilter: { code_name: string; code: string };
|
|
50
|
+
search: string;
|
|
51
|
+
indexOfFirstPost: number;
|
|
52
|
+
indexOfLastPost: number;
|
|
53
|
+
postPerPage: number;
|
|
54
|
+
currentPage: number;
|
|
55
|
+
router: any;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const NoticeList = ({
|
|
59
|
+
SearchBarProps,
|
|
60
|
+
PaginationProps,
|
|
61
|
+
noticeName,
|
|
62
|
+
noticeList,
|
|
63
|
+
currentCodeDesc,
|
|
64
|
+
isUseHeaderComponent,
|
|
65
|
+
nameFilter,
|
|
66
|
+
search,
|
|
67
|
+
indexOfFirstPost,
|
|
68
|
+
indexOfLastPost,
|
|
69
|
+
postPerPage,
|
|
70
|
+
currentPage,
|
|
71
|
+
router
|
|
72
|
+
}: NoticeListProps) => {
|
|
73
|
+
return (
|
|
74
|
+
<>
|
|
75
|
+
<PageWrapper>
|
|
76
|
+
<SearchBar
|
|
77
|
+
label={'검색어를 입력해주세요.'}
|
|
78
|
+
onChange={SearchBarProps.handleInputChange}
|
|
79
|
+
onClick={SearchBarProps.handleSearch}
|
|
80
|
+
search={SearchBarProps.searchInput}
|
|
81
|
+
placeholder={'검색어를 입력해주세요.'}
|
|
82
|
+
isKeyPress={true}
|
|
83
|
+
marginTop={[70, 50, 50]}
|
|
84
|
+
/>
|
|
85
|
+
<div
|
|
86
|
+
className={
|
|
87
|
+
'mb-10 flex w-full cursor-pointer border-[1px] border-solid border-[#DBDBDB] text-center '
|
|
88
|
+
}
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
tabIndex={0}
|
|
92
|
+
className={`${
|
|
93
|
+
nameFilter.code_name === '전체'
|
|
94
|
+
? 'bg-[#285FA7] text-[#fff]'
|
|
95
|
+
: "after:absolute after:right-[-1px] after:z-[-1] after:h-[45%] after:w-[1px] after:bg-[#DBDBDB] after:content-['']"
|
|
96
|
+
} relative w-[20%] py-3 text-[13px] 2xs:text-[16px] xs:py-4 sm:text-[22px]`}
|
|
97
|
+
onClick={() => {
|
|
98
|
+
router.push({
|
|
99
|
+
pathname: '/notice',
|
|
100
|
+
query: search
|
|
101
|
+
? { page: 1, search: search, nameFilter: '전체' }
|
|
102
|
+
: { page: 1, nameFilter: '전체' }
|
|
103
|
+
});
|
|
104
|
+
}}
|
|
105
|
+
onKeyDown={(e: any) => {
|
|
106
|
+
if (e.key === 'Enter') {
|
|
107
|
+
router.push({
|
|
108
|
+
pathname: '/notice',
|
|
109
|
+
query: search
|
|
110
|
+
? { page: 1, search: search, nameFilter: '전체' }
|
|
111
|
+
: { page: 1, nameFilter: '전체' }
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
전체
|
|
117
|
+
</div>
|
|
118
|
+
{noticeName.map((item: any, index: number) => (
|
|
119
|
+
<div
|
|
120
|
+
tabIndex={0}
|
|
121
|
+
key={index}
|
|
122
|
+
className={`${
|
|
123
|
+
nameFilter.code_name === item.code_name
|
|
124
|
+
? 'bg-[#285FA7] text-[#fff] '
|
|
125
|
+
: "after:absolute after:right-[-1px] after:z-[-1] after:h-[45%] after:w-[1px] after:bg-[#DBDBDB] after:content-['']"
|
|
126
|
+
} relative w-[20%] py-3 text-[13px] 2xs:text-[16px] xs:py-4 sm:text-[22px]`}
|
|
127
|
+
onClick={() => {
|
|
128
|
+
router.push({
|
|
129
|
+
pathname: '/notice',
|
|
130
|
+
query: search
|
|
131
|
+
? { page: 1, search: search, nameFilter: item.code_name }
|
|
132
|
+
: { page: 1, nameFilter: item.code_name }
|
|
133
|
+
});
|
|
134
|
+
}}
|
|
135
|
+
onKeyDown={(e: any) => {
|
|
136
|
+
if (e.key === 'Enter') {
|
|
137
|
+
router.push({
|
|
138
|
+
pathname: '/notice',
|
|
139
|
+
query: search
|
|
140
|
+
? { page: 1, search: search, nameFilter: item.code_name }
|
|
141
|
+
: { page: 1, nameFilter: item.code_name }
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}}
|
|
145
|
+
>
|
|
146
|
+
{item.code_name}
|
|
147
|
+
</div>
|
|
148
|
+
))}
|
|
149
|
+
</div>
|
|
150
|
+
<div className={'m-auto h-[100%] '}>
|
|
151
|
+
<table className={'w-[100%] table-fixed border-t-[2px] border-solid border-[#999] text-[12px]'}>
|
|
152
|
+
<colgroup className={''}>
|
|
153
|
+
<col className={'sm:w-[10%]'} />
|
|
154
|
+
<col width="55" className={'w-[75%] max-xs:w-[70%]'} />
|
|
155
|
+
{/* <col className={'w-[15%] max-xs:w-[20%]'} /> */}
|
|
156
|
+
</colgroup>
|
|
157
|
+
|
|
158
|
+
<thead>
|
|
159
|
+
<tr className={'border-t-[3px] border-solid border-[#515151] bg-[#FAFAFA]'}>
|
|
160
|
+
<th
|
|
161
|
+
scope="col"
|
|
162
|
+
className={
|
|
163
|
+
'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-[16px] font-[800] max-sm:text-xs'
|
|
164
|
+
}
|
|
165
|
+
>
|
|
166
|
+
No
|
|
167
|
+
</th>
|
|
168
|
+
<th
|
|
169
|
+
scope="col"
|
|
170
|
+
className={
|
|
171
|
+
'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-[16px] font-[800] max-sm:text-xs'
|
|
172
|
+
}
|
|
173
|
+
>
|
|
174
|
+
제목
|
|
175
|
+
</th>
|
|
176
|
+
{/* <th
|
|
177
|
+
scope="col"
|
|
178
|
+
className={
|
|
179
|
+
'py-[15px] border-b-[1px] border-[#d2d2d2] border-solid text-[16px] font-[800] max-sm:text-xs'
|
|
180
|
+
}
|
|
181
|
+
>
|
|
182
|
+
작성일
|
|
183
|
+
</th> */}
|
|
184
|
+
</tr>
|
|
185
|
+
</thead>
|
|
186
|
+
|
|
187
|
+
<tbody>
|
|
188
|
+
{noticeList.length > 0 && noticeList.slice(indexOfFirstPost, indexOfLastPost).length > 0 ? (
|
|
189
|
+
noticeList.slice(indexOfFirstPost, indexOfLastPost).map((item: any, index: number) => (
|
|
190
|
+
<tr key={item.id} className={''}>
|
|
191
|
+
<td
|
|
192
|
+
className={
|
|
193
|
+
'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-center sm:text-[16px]'
|
|
194
|
+
}
|
|
195
|
+
>
|
|
196
|
+
{noticeList.length -
|
|
197
|
+
(index + 1 + currentPage * postPerPage) +
|
|
198
|
+
postPerPage +
|
|
199
|
+
1}
|
|
200
|
+
</td>
|
|
201
|
+
<td
|
|
202
|
+
className={
|
|
203
|
+
'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] sm:text-[16px]'
|
|
204
|
+
}
|
|
205
|
+
>
|
|
206
|
+
<Link href={'/notice/' + item.id}>
|
|
207
|
+
<div>
|
|
208
|
+
<div className={'truncate'}>{item.title}</div>
|
|
209
|
+
</div>
|
|
210
|
+
</Link>
|
|
211
|
+
</td>
|
|
212
|
+
{/* <td
|
|
213
|
+
className={
|
|
214
|
+
'text-center py-[15px] border-b-[1px] border-[#d2d2d2] border-solid sm:text-[16px] tracking-[-1px]'
|
|
215
|
+
}
|
|
216
|
+
>
|
|
217
|
+
{item.timestamp}
|
|
218
|
+
</td> */}
|
|
219
|
+
</tr>
|
|
220
|
+
))
|
|
221
|
+
) : noticeList.length < 1 ? (
|
|
222
|
+
<tr>
|
|
223
|
+
<td
|
|
224
|
+
colSpan={2}
|
|
225
|
+
className={
|
|
226
|
+
'border-b-[1px] border-[#d2d2d2] py-[15px] ' +
|
|
227
|
+
'order-solid text-[16px] font-[400]'
|
|
228
|
+
}
|
|
229
|
+
>
|
|
230
|
+
<div className={'text-center'}>
|
|
231
|
+
<p>검색 결과가 없습니다.</p>
|
|
232
|
+
</div>
|
|
233
|
+
</td>
|
|
234
|
+
</tr>
|
|
235
|
+
) : (
|
|
236
|
+
<tr>
|
|
237
|
+
<td
|
|
238
|
+
colSpan={2}
|
|
239
|
+
className={
|
|
240
|
+
'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-[16px] font-[400]'
|
|
241
|
+
}
|
|
242
|
+
>
|
|
243
|
+
<div className={'text-center'}>
|
|
244
|
+
<p>정보 조회 중입니다.</p>
|
|
245
|
+
</div>
|
|
246
|
+
</td>
|
|
247
|
+
</tr>
|
|
248
|
+
)}
|
|
249
|
+
</tbody>
|
|
250
|
+
</table>
|
|
251
|
+
{noticeList && noticeList.length > 0 ? (
|
|
252
|
+
<Pagination
|
|
253
|
+
currentPage={PaginationProps.currentPage}
|
|
254
|
+
onPageChange={PaginationProps.onPaginationChange}
|
|
255
|
+
totalPages={Math.ceil(PaginationProps.totalCount / 9)}
|
|
256
|
+
/>
|
|
257
|
+
) : (
|
|
258
|
+
<></>
|
|
259
|
+
)}
|
|
260
|
+
</div>
|
|
261
|
+
</PageWrapper>
|
|
262
|
+
</>
|
|
263
|
+
);
|
|
264
|
+
};
|
|
265
|
+
export default NoticeList;
|
|
@@ -15,6 +15,7 @@ export { default as logout } from './Login/_api/logout';
|
|
|
15
15
|
export { default as goToAIDaeryun } from './Login/_lib/goToAIDaeryun';
|
|
16
16
|
export { default as FaqList } from './Faq/FaqList';
|
|
17
17
|
export { default as FaqDetail } from './Faq/Detail/FaqDetail';
|
|
18
|
+
export { default as NoticeList } from './Notice/NoticeList';
|
|
18
19
|
export { default as ConsultComplete } from './ConsultComplete/ConsultComplete';
|
|
19
20
|
export { default as Lawfirm } from './Lawfirm/Lawfirm';
|
|
20
21
|
export { default as StrengthNew } from './StrengthNew/StrengthNew';
|
|
@@ -17,6 +17,7 @@ export { default as logout } from './Login/_api/logout';
|
|
|
17
17
|
export { default as goToAIDaeryun } from './Login/_lib/goToAIDaeryun';
|
|
18
18
|
export { default as FaqList } from './Faq/FaqList';
|
|
19
19
|
export { default as FaqDetail } from './Faq/Detail/FaqDetail';
|
|
20
|
+
export { default as NoticeList } from './Notice/NoticeList';
|
|
20
21
|
export { default as ConsultComplete } from './ConsultComplete/ConsultComplete';
|
|
21
22
|
export { default as Lawfirm } from './Lawfirm/Lawfirm';
|
|
22
23
|
export { default as StrengthNew } from './StrengthNew/StrengthNew';
|
|
@@ -17,6 +17,7 @@ export { default as logout } from './Login/_api/logout';
|
|
|
17
17
|
export { default as goToAIDaeryun } from './Login/_lib/goToAIDaeryun';
|
|
18
18
|
export { default as FaqList } from './Faq/FaqList';
|
|
19
19
|
export { default as FaqDetail } from './Faq/Detail/FaqDetail';
|
|
20
|
+
export { default as NoticeList } from './Notice/NoticeList';
|
|
20
21
|
export { default as ConsultComplete } from './ConsultComplete/ConsultComplete';
|
|
21
22
|
export { default as Lawfirm } from './Lawfirm/Lawfirm';
|
|
22
23
|
export { default as StrengthNew } from './StrengthNew/StrengthNew';
|