From 7a8e3c4258b295d7dafab8c4a04368d1a89781ff Mon Sep 17 00:00:00 2001 From: sayyyho <323psh@naver.com> Date: Sun, 3 Nov 2024 03:23:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Fix]=20-=20=EC=97=90=EB=9F=AC=20=ED=94=BD?= =?UTF-8?q?=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/instance.ts | 5 ++--- src/components/common/input/Input.tsx | 6 +++--- src/pages/login/Login.tsx | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/apis/instance.ts b/src/apis/instance.ts index 7f2cc99..701a8e1 100644 --- a/src/apis/instance.ts +++ b/src/apis/instance.ts @@ -1,12 +1,11 @@ import axios, { AxiosRequestConfig } from "axios"; const axiosConfig: AxiosRequestConfig = { - baseURL: "", + baseURL: "https://port-0-f4-back-m30e9x2h74f3a212.sel4.cloudtype.app/", withCredentials: false, - // false를 통해 cross domain request 시 HTTP 인증 및 클라이언트 SSL 인증서 사용 허용 headers: { "Content-Type": "application/json", }, }; -export const client = axios.create(axiosConfig); +export const instance = axios.create(axiosConfig); diff --git a/src/components/common/input/Input.tsx b/src/components/common/input/Input.tsx index 222bcdd..28721b8 100644 --- a/src/components/common/input/Input.tsx +++ b/src/components/common/input/Input.tsx @@ -4,10 +4,10 @@ import * as S from "./style"; interface InputProps { label: string; - essential: boolean; + essential?: boolean; hint: string; - value: string; - onChange: (e: React.ChangeEvent) => void; + value?: string; + onChange?: (e: React.ChangeEvent) => void; } const Input: React.FC = ({ diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx index 551729c..8d4336e 100644 --- a/src/pages/login/Login.tsx +++ b/src/pages/login/Login.tsx @@ -36,7 +36,7 @@ const Login: React.FC = () => { paragraph="팀을 참가할 때 간단한 정보를 입력받아요." /> - + From 17dfcdb0a15317acc73adff1e55984c41f433eda Mon Sep 17 00:00:00 2001 From: sayyyho <323psh@naver.com> Date: Sun, 3 Nov 2024 03:24:26 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Fix]=20-=20=EC=97=90=EB=9F=AC=20=ED=94=BD?= =?UTF-8?q?=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useUserProfile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useUserProfile.ts b/src/hooks/useUserProfile.ts index de8b5ef..0903fcd 100644 --- a/src/hooks/useUserProfile.ts +++ b/src/hooks/useUserProfile.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { AxiosResponse } from "axios"; -import { client } from "@apis/instance"; +import { instance } from "@apis/instance"; export const useUserProfile = () => { const [response, setResponse] = useState(null); @@ -9,7 +9,7 @@ export const useUserProfile = () => { const fetchData = async () => { try { // TODO - team_id 저장, profile id 저장 - const response = await client.get( + const response = await instance.get( "https://test.site/api/teams/{team_id}/profiles/{profile_id}" ); setResponse(response);