File tree Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Expand file tree Collapse file tree 5 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "extends" : " next/core-web-vitals"
2
+ "extends" : " next" ,
3
+ "rules" : {
4
+ "react/no-unescaped-entities" : " off" ,
5
+ "@next/next/no-page-custom-font" : " off"
6
+ }
3
7
}
Original file line number Diff line number Diff line change
1
+ import { AxiosResponse } from 'axios' ;
2
+ import instance from './axiosInstance' ;
3
+
4
+ const SEARCH = {
5
+ path : '/search' ,
6
+
7
+ //검색 페이지 불러오기 api [get]
8
+ async getSearchPageApi ( words : string ) : Promise < any > {
9
+ const result : AxiosResponse = await instance . get (
10
+ `${ SEARCH . path } /all/count` ,
11
+ {
12
+ params : {
13
+ searchQuery : words ,
14
+ } ,
15
+ } ,
16
+ ) ;
17
+ return result . data ;
18
+ } ,
19
+ } ;
20
+
21
+ export default SEARCH ;
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ const CategorySelector = () => {
33
33
< SelectOptions show = { `${ isOpenModal } ` } >
34
34
{ categoryList . map ( ( list ) => {
35
35
return (
36
- < div >
37
- < Option key = { list . id } onClick = { handleOnChangeSelectValue } >
36
+ < div key = { list . id } >
37
+ < Option onClick = { handleOnChangeSelectValue } >
38
38
{ list . category }
39
39
</ Option >
40
40
</ div >
Original file line number Diff line number Diff line change
1
+ import SEARCH from '@/apis/search' ;
1
2
import HelpCard from '@/components/molecules/help-board-elements/HelpCard' ;
2
3
import { useEffect , useState } from 'react' ;
3
4
import styled from 'styled-components' ;
4
5
5
6
const HelpBoardCardList = ( ) => {
6
7
//api요청
8
+ const getHelpListApi = async ( ) => {
9
+ const response = await SEARCH . getSearchPageApi ;
10
+ } ;
7
11
8
12
return (
9
13
< HelpCardWrapper >
Original file line number Diff line number Diff line change 1
1
import SubPageHeader from '@/components/common/header/SubPageHeader' ;
2
- import HelpBoardCardList from '../organisms/help-board/HelpBoardCard ' ;
2
+ import HelpBoardCardList from '../organisms/help-board/HelpBoardCardList ' ;
3
3
import Link from 'next/link' ;
4
4
import Category from '../common/category/Category' ;
5
5
You can’t perform that action at this time.
0 commit comments