-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
795 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,26 @@ | ||
import axios from "axios"; | ||
|
||
// [get] ์ ์ ์ ์ ์ฒด ๋ค์ด์ด๋ฆฌ ์กฐํ | ||
export const getThemeList = async ( | ||
page: number, | ||
title: string, | ||
region: string | ||
) => { | ||
try { | ||
const response = await axios({ | ||
method: "GET", | ||
url: "https://api.labyrinth30-edu.link/themes", | ||
params: { | ||
page: page, | ||
title: title, | ||
region: region, | ||
}, | ||
}); | ||
// ์๋ต ๊ฒฐ๊ณผ : id / title / difficulty / genre / store { id / name / reservationSite } | ||
// console.log(response.data); | ||
|
||
return response.data; | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
}; |
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,27 @@ | ||
import { Review } from "../styles/ReviewStyled"; | ||
|
||
const ReviewTheme = () => { | ||
return ( | ||
<Review> | ||
<div className="titleBox"> | ||
<p>์ ๋ชฉ</p> | ||
</div> | ||
<div className="addressBox"> | ||
<p>๋งค์ฅ</p> | ||
</div> | ||
<div className="contentBox"> | ||
<p>๋ฆฌ๋ทฐ</p> | ||
</div> | ||
<div className="cardFooter"> | ||
<div className="hashtagBox"> | ||
<p>#ํ์ถ ์ฑ๊ณต</p> | ||
<p>#4๋ช </p> | ||
<p>#ํํธ 3๋ฒ</p> | ||
<p>#๋จ์ ์๊ฐ 10๋ถ</p> | ||
</div> | ||
</div> | ||
</Review> | ||
); | ||
}; | ||
|
||
export default ReviewTheme; |
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,49 @@ | ||
import React, { useEffect, useState, KeyboardEvent, ChangeEvent } from "react"; | ||
import Review from "../components/Review"; | ||
import { Container, StartBtn } from "../styles/MyPageStyled"; | ||
import Pagination from "../components/BasicPagination"; | ||
|
||
const MyPage = () => { | ||
const [take, setTake] = useState<number>(1); // ์ด ํ์ด์ง ์ | ||
const [page, setPage] = useState<number>(1); // ํ์ฌ ํ์ด์ง | ||
|
||
const handleChangePage = ( | ||
event: React.ChangeEvent<unknown>, | ||
value: number | ||
) => { | ||
setPage(value); // ํ์ด์ง ๋ณ๊ฒฝ ์ ํ์ฌ ํ์ด์ง ์ํ ์ ๋ฐ์ดํธ | ||
}; | ||
|
||
return ( | ||
<Container> | ||
<div className="headerBox"> | ||
<div className="textBox"> | ||
<div className="subTitle">๋น์ ์ ์ํ ๋ฐฉ,</div> | ||
<div className="title">username๋์ ๋ฐฉํ์ถ ์ผ์ง</div> | ||
</div> | ||
|
||
<StartBtn isVisible={true}> | ||
<div className="startBtn"> | ||
<p className="start">๋ฆฌ๋ทฐ ์์ฑ</p> | ||
</div> | ||
</StartBtn> | ||
</div> | ||
|
||
<div className="reviewBox"> | ||
<Review /> | ||
<Review /> | ||
<Review /> | ||
<Review /> | ||
</div> | ||
|
||
<div className="paginationBox"> | ||
<Pagination | ||
count={take} | ||
page={page} | ||
onChange={handleChangePage} | ||
/> | ||
</div> | ||
</Container> | ||
); | ||
}; | ||
export default MyPage; |
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,93 @@ | ||
import React, { useEffect, useState, KeyboardEvent, ChangeEvent } from "react"; | ||
import { Container, StartBtn } from "../styles/PostReviewStyled"; | ||
|
||
const PostReview = () => { | ||
const onInputHandler = ( | ||
e: ChangeEvent<HTMLTextAreaElement | HTMLInputElement> | ||
) => { | ||
// const value = e.target.value.trim(); // ์ ๋ ฅ๊ฐ ์๋ค ๊ณต๋ฐฑ ์ ๊ฑฐ | ||
// if (e.target.name === "title") { | ||
// setTitle(value); | ||
// } else if (e.target.name === "content") { | ||
// setContent(value); | ||
// setInputCount(value.length); | ||
// } else if (e.target.name === "tags") { | ||
// const tagArray = value | ||
// .split("#") | ||
// .map((tag) => tag.trim()) | ||
// .filter((tag) => tag !== ""); | ||
// setTags(tagArray); | ||
// } | ||
}; | ||
|
||
return ( | ||
<Container> | ||
<div className="postBox"> | ||
<div className="btnBox"> | ||
<StartBtn isVisible={true}> | ||
<div className="startBtn"> | ||
<p className="start">์ ์ฅ</p> | ||
</div> | ||
</StartBtn> | ||
</div> | ||
|
||
<div className="posting"> | ||
<p className="postTitle">ํ ๋ง ์ด๋ฆ</p> | ||
<input | ||
name="themeName" | ||
placeholder="๋ฐฉํ์ถ ์ง์ ๊ณผ ํ ๋ง ์ด๋ฆ" | ||
onChange={onInputHandler} | ||
className="postThemeTitle" | ||
></input> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">์ฑ๊ณต ์ฌ๋ถ</p> | ||
<select> | ||
<option value="success">์ฑ๊ณต</option> | ||
<option value="fail">์คํจ</option> | ||
</select> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">์ธ์ ์</p> | ||
<input | ||
type="number" | ||
name="themeName" | ||
placeholder="ํ๋ ์ด ์ธ์" | ||
onChange={onInputHandler} | ||
className="postTagsBox" | ||
></input> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">ํํธ ์ฌ์ฉ</p> | ||
<input | ||
type="number" | ||
name="themeName" | ||
placeholder="ํํธ ์ฌ์ฉ ๊ฐ์" | ||
onChange={onInputHandler} | ||
className="postTagsBox" | ||
></input> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">๋จ์ ์๊ฐ</p> | ||
<input | ||
name="themeName" | ||
placeholder="๋จ์ ์๊ฐ (ํ์ถ ์ฑ๊ณต์)" | ||
onChange={onInputHandler} | ||
className="postTagsBox" | ||
></input> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">ํ ์ค ๋ฆฌ๋ทฐ</p> | ||
<textarea | ||
name="content" | ||
placeholder="๋ด์ฉ์ ์ ๋ ฅํด์ฃผ์ธ์" | ||
onChange={onInputHandler} | ||
maxLength={2000} | ||
className="postContent" | ||
></textarea> | ||
</div> | ||
</div> | ||
</Container> | ||
); | ||
}; | ||
export default PostReview; |
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,68 @@ | ||
import React, { useEffect, useState, KeyboardEvent, ChangeEvent } from "react"; | ||
import { Container, StartBtn } from "../styles/ReadReviewStyled"; | ||
|
||
const PostReview = () => { | ||
const onInputHandler = ( | ||
e: ChangeEvent<HTMLTextAreaElement | HTMLInputElement> | ||
) => { | ||
// const value = e.target.value.trim(); // ์ ๋ ฅ๊ฐ ์๋ค ๊ณต๋ฐฑ ์ ๊ฑฐ | ||
// if (e.target.name === "title") { | ||
// setTitle(value); | ||
// } else if (e.target.name === "content") { | ||
// setContent(value); | ||
// setInputCount(value.length); | ||
// } else if (e.target.name === "tags") { | ||
// const tagArray = value | ||
// .split("#") | ||
// .map((tag) => tag.trim()) | ||
// .filter((tag) => tag !== ""); | ||
// setTags(tagArray); | ||
// } | ||
}; | ||
|
||
return ( | ||
<Container> | ||
<div className="postBox"> | ||
<div className="btnBox"> | ||
<StartBtn isVisible={true}> | ||
<div className="startBtn"> | ||
<p className="start">์์ </p> | ||
</div> | ||
</StartBtn> | ||
|
||
<StartBtn isVisible={true}> | ||
<div className="startBtn"> | ||
<p className="start">์ญ์ </p> | ||
</div> | ||
</StartBtn> | ||
</div> | ||
|
||
<div className="posting"> | ||
<p className="postTitle">ํ ๋ง ์ด๋ฆ</p> | ||
<p className="read">ํ ๋ง ์ด๋ฆ</p> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">์ฑ๊ณต ์ฌ๋ถ</p> | ||
<p className="read">์ฑ๊ณต</p> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">์ธ์ ์</p> | ||
<p className="read">0 ๋ช </p> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">ํํธ ์ฌ์ฉ</p> | ||
<p className="read">4 ๊ฐ</p> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">๋จ์ ์๊ฐ</p> | ||
<p className="read">1 ๋ถ</p> | ||
</div> | ||
<div className="posting"> | ||
<p className="postTitle">ํ ์ค ๋ฆฌ๋ทฐ</p> | ||
<p className="read">์ฌ๋ฏธ์์ด์.</p> | ||
</div> | ||
</div> | ||
</Container> | ||
); | ||
}; | ||
export default PostReview; |
Oops, something went wrong.