Skip to content

Commit da050aa

Browse files
committed
refactor : 리뷰 사항 적용
1 parent 76e991c commit da050aa

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/components/common/reportCheckBox/ReportCheckBox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as S from './ReportCheckBox.styled';
2-
import { reasons } from '../../../constants/user/reportConstants';
2+
import { REASON_LIST } from '../../../constants/user/reportConstants';
33

44
interface ReportCheckBoxProps {
55
isNotExist?: boolean;
@@ -14,8 +14,8 @@ const ReportCheckBox = ({
1414
}: ReportCheckBoxProps) => {
1515
return (
1616
<S.Container>
17-
{reasons.map((reason) => (
18-
<S.CheckItem key={reason}>
17+
{REASON_LIST.map((reason, index) => (
18+
<S.CheckItem key={index}>
1919
<S.CheckInput
2020
type='checkbox'
2121
name='reason'

src/constants/user/reportConstants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const reasons = [
1+
export const REASON_LIST = [
22
'욕설/비속어',
33
'성적내용/음란물',
44
'광고/스팸',

src/hooks/admin/useGetAllReports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useQuery } from '@tanstack/react-query';
22
import { ReportData } from '../queries/keys';
33
import { getAllReports } from '../../api/admin/report.api';
4-
import { SearchType } from '../../models/search';
4+
import type { SearchType } from '../../models/search';
55

66
export const useGetAllReports = (searchUnit: SearchType) => {
77
const {

0 commit comments

Comments
 (0)