Skip to content

Commit

Permalink
Merge pull request #58 from LikeLionHGU/hwan_#57/로그인확인오류수정
Browse files Browse the repository at this point in the history
Hwan #57/로그인확인오류수정
  • Loading branch information
hwan129 authored Jun 8, 2024
2 parents 9e8034b + 79bd42c commit 3194e03
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/review/onLogin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default function OnLogin() {
.catch((error) => {
console.error("Error occurred while fetching:", error);
});
fetch(`http://223.p-e.kr:8080/get/stores/detail?storeId=${ID}`)
fetch(`http://localhost:8080/get/stores/detail?storeId=${ID}`)
.then((response) => response.json())
.then((detailStore) => {
// console.log(detailStore);
Expand Down
11 changes: 5 additions & 6 deletions src/components/review/reviewList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { storeIdState } from "../../atom";

const ScrollContainer = styled.div`
overflow: scroll;
/* width: 372px; */
position: absolute;
width: 300px;
height: 750px;
&::-webkit-scrollbar {
Expand Down Expand Up @@ -232,12 +232,13 @@ export default function ReviewList() {
// console.log(ID);

useEffect(() => {
fetch(`http://223.p-e.kr:8080/get/stores/detail?storeId=${ID}`, {
fetch(`http://localhost:8080/get/stores/detail?storeId=${ID}`, {
redirect: "manual",
// credentials: "include",
})
.then((res) => res.json())
.then((res) => {
// console.log("AAAAAAAA", res)
// setID(res.ID);
setStoreName(res.storeName);
setLocalNumberAddress(res.localNumberAddress);
Expand Down Expand Up @@ -265,7 +266,7 @@ export default function ReviewList() {
}, [ID]);

useEffect(() => {
fetch(`http://223.p-e.kr:8080/get/store/spicy-level?storeId=${ID}`, {
fetch(`http://localhost:8080/get/store/spicy-level?storeId=${ID}`, {
redirect: "manual",
// credentials: "include",
})
Expand Down Expand Up @@ -308,7 +309,6 @@ export default function ReviewList() {
<ReCount>
{review.reviewCountList && review.reviewCountList[0]}
</ReCount>
<Writeimg />
{/* <WriteBtn onClick={}>리뷰 쓰기</WriteBtn> */}

<Writeimg
Expand All @@ -325,7 +325,6 @@ export default function ReviewList() {
>
리뷰 쓰기
</WriteBtn>

</ReviewTop>
{Array.isArray(data) && data.length > 0 ? (
data.map((review, index) => (
Expand Down
3 changes: 2 additions & 1 deletion src/components/review/sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const Sidebar = ({ width = 300, children }) => {
}
};

console.log(reviewUiState, completeReview);
// console.log(reviewUiState, completeReview);

return (
// container
Expand All @@ -148,6 +148,7 @@ const Sidebar = ({ width = 300, children }) => {
{/* <CompleteReview/> 리뷰 작성 완료 */}
{/* <ReviewList/> 리뷰 보여주기 */}
{detail ? onLogin ? pleaseWork() : <NonLog /> : <MapLogo />}

{detail ? (
<OpenBtn onClick={() => toggleMenu()}>
<img src={LeftArrow} alt="" />
Expand Down
7 changes: 3 additions & 4 deletions src/routes/map/MapContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default function MapContainer() {
setCurrentPosition({ lat, lng });

// const url = `http://223.p-e.kr:8080/get/stores?x=${lng}&y=${lat}&radius=10000`;
const url = `http://223.p-e.kr:8080/get/stores?x=${lng}&y=${lat}&radius=1000`;
const url = `http://localhost:8080/get/stores?x=${lng}&y=${lat}&radius=1000`;
fetch(url)
.then((response) => response.json())
.then((data) => {
Expand All @@ -152,7 +152,7 @@ export default function MapContainer() {
useEffect(() => {
if (result.getLng && result.getLat) {
fetch(
`http://223.p-e.kr:8080/get/stores?x=${result.getLng()}&y=${result.getLat()}&radius=1000`
`http://localhost:8080/get/stores?x=${result.getLng()}&y=${result.getLat()}&radius=1000`
)
.then((response) => response.json())
.then((data) => {
Expand All @@ -178,8 +178,7 @@ export default function MapContainer() {
setIsOpen(!isOpen); // 리코일
// console.log(ID);
if (!isOpen) {
const urlR = `http://223.p-e.kr:8080/get/store/spicy-level?storeId=${storeId}`;

const urlR = `http://localhost:8080/get/store/spicy-level?storeId=${storeId}`;
fetch(urlR)
.then((response) => response.json())
.then((review) => {
Expand Down
8 changes: 2 additions & 6 deletions src/routes/mypage/MyPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const CharContainer = styled.div`
`;

const CharImg = styled.div`
width: 228px;
height: 228px;
border-radius: 100%;
background-color: white;
margin-top: 87px;
`;

Expand Down Expand Up @@ -221,7 +217,7 @@ export default function MyPage() {
{
<img
src={characterMyPageImage}
style={{ width: "60%", marginLeft: "45px" }}
style={{ width: "228px", height: "228px" }}
alt="Character"
/>
}
Expand All @@ -242,7 +238,7 @@ export default function MyPage() {
<RContent>리뷰 내역</RContent>
{data.map((review, index) => (
<ReviewBox key={index}>
<Name>{review.title} </Name>
<Name>{review.title} > </Name>
<Detail>
<Fire>불점 {review.reviewSpicyLevel}</Fire>
</Detail>
Expand Down

0 comments on commit 3194e03

Please sign in to comment.