-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: contextAPI 초안 * feat: localstorage에 로그 적재 작업 * fix: put 메서드로 변경 * fix: message변경 * fix: strict mode 제거+ 중복검사 함수 삭제
- Loading branch information
1 parent
8a46d32
commit ed97f98
Showing
11 changed files
with
119 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import axios from 'axios'; | ||
|
||
export const customedAxios = axios.create({ | ||
baseURL: import.meta.env.VITE_API_URL, | ||
headers: { | ||
'Content-Type': 'application/json', | ||
withCredentials: true, | ||
}, | ||
}); | ||
|
||
export default customedAxios; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
export const postLog = async () => {}; | ||
import customedAxios from './customedAxios'; | ||
|
||
export const postLog = async () => { | ||
const res = await customedAxios.put(''); | ||
return res.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { useState } from 'react'; | ||
import { LogClick } from '../LogClick'; | ||
import { useLocation } from 'react-router-dom'; | ||
import { LogScreen } from '../LogScreen'; | ||
export const Drawer = () => { | ||
const [count, setCount] = useState(0); | ||
const router = useLocation(); | ||
|
||
return ( | ||
<> | ||
<h1>Drawer</h1> | ||
<div className="card"> | ||
<LogScreen | ||
params={{ | ||
path: router.pathname, | ||
name: '', | ||
userId: 'test', | ||
serviceName: 'home', | ||
}} | ||
> | ||
<LogClick | ||
params={{ | ||
name: 'click', | ||
serviceName: 'home', | ||
path: router.pathname, | ||
userId: 'test', | ||
}} | ||
> | ||
<button onClick={() => setCount((count) => count + 1)}>count is {count}</button> | ||
</LogClick> | ||
</LogScreen> | ||
</div> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters