Skip to content

Commit

Permalink
Merge pull request #25 from moyeothon/develop
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
sayyyho authored Nov 2, 2024
2 parents 2559014 + 17dfcdb commit e343bff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/apis/instance.ts
Original file line number Diff line number Diff line change
@@ -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);
6 changes: 3 additions & 3 deletions src/components/common/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLInputElement>) => void;
value?: string;
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
}

const Input: React.FC<InputProps> = ({
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useUserProfile.ts
Original file line number Diff line number Diff line change
@@ -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<AxiosResponse | null>(null);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Login: React.FC = () => {
paragraph="팀을 참가할 때 간단한 정보를 입력받아요."
/>
<InputForm>
<Input label="이름" essential hint="" />
<Input label="이름" hint="" />
<DateInput />
</InputForm>
</Container>
Expand Down

0 comments on commit e343bff

Please sign in to comment.