-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. API요청 및 응답 정상 반영되는 것 확인 2. 비밀번호 찾기 질문 조회 API 개발 Resolve: #127
- Loading branch information
Showing
8 changed files
with
139 additions
and
26 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card"; | ||
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Input } from "@/components/ui/input"; | ||
import { GenerateLiElUUID } from "@/utils/common"; | ||
import { Link } from "react-router-dom"; | ||
import ArticleDialog from "@/components/ArticleDialog"; | ||
|
@@ -17,9 +18,14 @@ import ChatBox from "@/components/ChatBox"; | |
import FollowInfo from "@/components/FollowInfo"; | ||
import MyResumes from "@/components/MyResumes"; | ||
import UserPage from "./UserPage"; | ||
import { fetchUserProfile, saveProfile, withdraw } from "@/utils/API"; | ||
import { saveProfileReqParam, withdrawReqParam } from "@/utils/Parameter"; | ||
|
||
|
||
const Test = () => { | ||
const email = "[email protected]"; | ||
const [file, setFile] = useState(null); | ||
|
||
const resource = { | ||
btnText: "생성", | ||
clickCallback: () =>{ | ||
|
@@ -29,8 +35,35 @@ const Test = () => { | |
initFn: () => {} | ||
} | ||
|
||
const userProfileDemo = () =>{ | ||
|
||
fetchUserProfile(email) | ||
.then((data) => {console.log(data)}); | ||
} | ||
|
||
const userWithdraw = (bool) =>{ | ||
const reqParam = withdrawReqParam("[email protected]", "Dlxogml!135", bool); | ||
|
||
withdraw(reqParam) | ||
.then(data => console.log(data)); | ||
} | ||
|
||
const saveUserProfile = () =>{ | ||
const reqParam = saveProfileReqParam(email, "123","서울","ㄷㅈ매럊믇ㄹ",file); | ||
|
||
saveProfile(reqParam) | ||
.then(response => console.log(response)); | ||
} | ||
|
||
return ( | ||
<UserPage></UserPage> | ||
<div> | ||
<Button onClick={userProfileDemo}>유저 프로필 조회</Button> | ||
<Button onClick={() =>userWithdraw(true)}>회원 탈퇴 API true</Button> | ||
<Button onClick={() =>userWithdraw(false)}>회원 탈퇴 API false</Button> | ||
|
||
<Input type="file" onChange={ev =>setFile(ev.target.files[0])}></Input> | ||
<Button onClick={saveUserProfile}>유저 프로필 저장</Button> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { SelectItem } from "@/components/ui/select" | ||
|
||
/** | ||
* | ||
* @param {{id: String, question: String}[]} questions | ||
* @returns | ||
*/ | ||
export const getPasswordQuestionItems = (questions) =>{ | ||
const questionSelectItems = questions.map(item => (<SelectItem key={item.id} value={item.id}>{item.question}</SelectItem>)); | ||
return questionSelectItems; | ||
} |
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