support
This commit is contained in:
@@ -36,7 +36,7 @@ export const FaqDetailPage = () => {
|
||||
<div className="faq-detail">
|
||||
<div className="faq-detail__title">{ title }</div>
|
||||
<div className="faq-detail__divider"></div>
|
||||
<div className="faq-detail__body" dangerouslySetInnerHTML={{ __html: contents }}>{ }</div>
|
||||
<div className="faq-detail__body" dangerouslySetInnerHTML={{ __html: contents || '' }}></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNoticeDetailMutation } from '@/entities/support/api/use-notice-detail-mutation';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import { NoticeItem } from '@/entities/support/model/types';
|
||||
import { NoticeDetailParams, NoticeDetailResponse, NoticeItem } from '@/entities/support/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
@@ -38,15 +38,12 @@ export const NoticeDetailPage = () => {
|
||||
|
||||
const { mutateAsync: noticeDetail } = useNoticeDetailMutation();
|
||||
|
||||
|
||||
|
||||
const callDetail = () => {
|
||||
let detailParams = {
|
||||
let detailParams: NoticeDetailParams = {
|
||||
noticeId: location?.state.id,
|
||||
};
|
||||
|
||||
noticeDetail(detailParams).then((rs) => {
|
||||
console.log(rs);
|
||||
noticeDetail(detailParams).then((rs: NoticeDetailResponse) => {
|
||||
setResult(rs);
|
||||
});
|
||||
};
|
||||
@@ -66,7 +63,7 @@ export const NoticeDetailPage = () => {
|
||||
<div className="notice-detail__title">{ result.title }</div>
|
||||
<div className="notice-detail__meta">{ moment(result.regDate).format('YYYY.MM.DD') } | { t(`support.notice.categories.${result.category}`) }</div>
|
||||
<div className="notice-detail__divider"></div>
|
||||
<div className="notice-detail__body">{ result.content }</div>
|
||||
<div className="notice-detail__body" dangerouslySetInnerHTML={{ __html: result.content || '' }}></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -78,7 +78,7 @@ export const QnaDetailPage = () => {
|
||||
</div>
|
||||
<div className="inq-detail__kv">
|
||||
<div className="k">내용</div>
|
||||
<div className="v">{ contents }</div>
|
||||
<div className="v" dangerouslySetInnerHTML={{ __html: contents || '' }}></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,13 +13,15 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const QnaListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>('all');
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>('');
|
||||
const [resultList, setResultList] = useState<Array<QnaItem>>([]);
|
||||
|
||||
useSetHeaderTitle(t('support.qna.title'));
|
||||
@@ -32,7 +34,7 @@ export const QnaListPage = () => {
|
||||
const { mutateAsync: qnaList } = useQnaListMutation();
|
||||
const callList = () => {
|
||||
let listParams = {
|
||||
category: selectedCategory,
|
||||
mid: userMid,
|
||||
...{page: pageParam}
|
||||
};
|
||||
|
||||
@@ -69,7 +71,6 @@ export const QnaListPage = () => {
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [selectedCategory]);
|
||||
|
||||
return (
|
||||
@@ -88,15 +89,18 @@ export const QnaListPage = () => {
|
||||
</div>
|
||||
<div className="notice-filter">
|
||||
<select
|
||||
className="flex-1"
|
||||
value={selectedCategory}
|
||||
onChange={(e: ChangeEvent<HTMLSelectElement>) => setSelectedCategory(e.target.value)}>
|
||||
<option value="all">{t('support.qna.categories.all')}</option>
|
||||
className="flex-1"
|
||||
value={selectedCategory}
|
||||
onChange={(e: ChangeEvent<HTMLSelectElement>) => setSelectedCategory(e.target.value)}
|
||||
>
|
||||
<option value="">{t('support.qna.categories.all')}</option>
|
||||
<option value="01">{t('support.qna.categories.01')}</option>
|
||||
<option value="02">{t('support.qna.categories.02')}</option>
|
||||
<option value="03">{t('support.qna.categories.03')}</option>
|
||||
<option value="04">{t('support.qna.categories.04')}</option>
|
||||
<option value="05">{t('support.qna.categories.05')}</option>
|
||||
<option value="06">{t('support.qna.categories.06')}</option>
|
||||
<option value="09">{t('support.qna.categories.09')}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="inq-list">
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export enum QnaRegisterPropsName {
|
||||
Mid = 'Mid',
|
||||
@@ -22,8 +23,9 @@ export enum QnaRegisterPropsName {
|
||||
|
||||
export const QnaRegisterPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>('string');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [counselType, setCounselType] = useState<string>('st');
|
||||
const [requestName, setRequestName] = useState<string>('');
|
||||
const [requestTel, setRequestTel] = useState<string>('');
|
||||
|
||||
Reference in New Issue
Block a user