faq 추가
This commit is contained in:
@@ -7,17 +7,22 @@ export interface FaqListParams {
|
||||
category: string;
|
||||
searchValue: string;
|
||||
};
|
||||
export interface FaqListItemProps {
|
||||
sortNo: string;
|
||||
seq: string;
|
||||
category: string;
|
||||
categoryName: string;
|
||||
title: string;
|
||||
contents: string;
|
||||
export interface FaqListItem {
|
||||
sortNo?: string;
|
||||
seq?: string;
|
||||
category?: string;
|
||||
categoryName?: string;
|
||||
title?: string;
|
||||
contents?: string;
|
||||
};
|
||||
export interface FaqListResponse extends DefaulResponsePagination {
|
||||
content: Array<FaqListItemProps>;
|
||||
content: Array<FaqListItem>;
|
||||
hasNext: boolean;
|
||||
nextCursor: string | null;
|
||||
};
|
||||
export interface FaqItemProps extends FaqListItem {
|
||||
|
||||
}
|
||||
export interface CounselListParams extends SupportParams {
|
||||
|
||||
};
|
||||
|
||||
37
src/entities/support/ui/faq-item.tsx
Normal file
37
src/entities/support/ui/faq-item.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { FaqItemProps } from '../model/types';
|
||||
|
||||
export const SupportFaqItem = ({
|
||||
sortNo,
|
||||
seq,
|
||||
category,
|
||||
categoryName,
|
||||
title,
|
||||
contents,
|
||||
}: FaqItemProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const onClickToDetail = () => {
|
||||
navigate(PATHS.support.faq.detail, {
|
||||
state: {
|
||||
title,
|
||||
contents
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="faq-row"
|
||||
onClick={ () => onClickToDetail() }
|
||||
>
|
||||
<div className="faq-txt">
|
||||
<div className="faq-title">{ title }</div>
|
||||
<div className="faq-tag">{ categoryName }</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user