Skip to content

Commit

Permalink
Merge pull request #46 from Kusitms-28th-Kobaco-B/feat/#40
Browse files Browse the repository at this point in the history
[feat] 데이터 연결 및 오류 수정
  • Loading branch information
HIHJH authored Mar 10, 2024
2 parents 7f9f266 + 9e62139 commit 8749ad1
Show file tree
Hide file tree
Showing 21 changed files with 1,159 additions and 688 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.env
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
"dependencies": {
"@amcharts/amcharts4": "^4.10.38",
"@next/font": "^14.1.0",
"@types/qs": "^6.9.12",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"apexcharts": "^3.46.0",
"axios": "^1.6.7",
"chart.js": "^4.4.2",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"framer-motion": "^11.0.8",
"next": "14.1.0",
"qs": "^6.12.0",
"react": "^18",
"react-apexcharts": "^1.4.1",
"react-chartjs-2": "^5.2.0",
Expand Down
12 changes: 12 additions & 0 deletions src/apis/adCopy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { NextApiRequest, NextApiResponse } from "next";

export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
if (req.method === "POST") {
res.status(200).json({ message: "Copy created successfully" });
} else {
res.status(405).json({ message: "Method Not Allowed" });
}
}
9 changes: 9 additions & 0 deletions src/apis/axios.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import axios from "axios";
import { parse, stringify } from "qs";

export const kobacoAxios = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL,
paramsSerializer: (params) => {
return stringify(params, { arrayFormat: "brackets" });
},
});
2 changes: 1 addition & 1 deletion src/components/adCopy/AdCopySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const AdCopySearch = (props: AdCopySearchProps) => {
const { setSearchName } = props;

const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
if (event.key === "Enter") {
if (event.key === "Enter" && event.nativeEvent.isComposing === false) {
setSearchName(name);
setName("");
}
Expand Down
Loading

0 comments on commit 8749ad1

Please sign in to comment.