-
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.
Merge pull request #168 from LikeLion-at-DGU/dev
🚀 Deploy
- Loading branch information
Showing
18 changed files
with
239 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { instance } from "./instance"; | ||
|
||
export const getStarContent = async (id) => { | ||
try { | ||
const res = await instance.get(`/api/celeb/${id}/`); | ||
return res; | ||
} catch (err) { | ||
console.log(err); | ||
throw err; | ||
} | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,39 @@ | ||
import React from "react"; | ||
import * as S from "./styled"; | ||
import checkBadge from "../../assets/checkbadge.svg"; | ||
import progressingBar from "../../assets/ProgressingBar.svg"; | ||
import ShareIcon from "../../assets/shareIcon.svg"; | ||
|
||
const ProgressingBar = () => { | ||
return ( | ||
<S.ProgressingBarWrapper> | ||
<img src={progressingBar} /> | ||
<img src={progressingBar} /> | ||
<img src={progressingBar} /> | ||
<img src={progressingBar} /> | ||
<img src={progressingBar} /> | ||
<img src={progressingBar} /> | ||
</S.ProgressingBarWrapper> | ||
); | ||
}; | ||
export const StarHeader = ({ usercount, totalcount }) => { | ||
return ( | ||
<> | ||
<S.layout> | ||
<div className="progress"> | ||
<img src={checkBadge} /> | ||
<S.ProgressContainr> | ||
<div> | ||
달성 진행중 {usercount}/{totalcount} | ||
</div> | ||
<ProgressingBar /> | ||
</S.ProgressContainr> | ||
</div> | ||
<S.ShareContainr> | ||
<div>총 00회</div> | ||
<img src={ShareIcon} /> | ||
</S.ShareContainr> | ||
</S.layout> | ||
</> | ||
); | ||
}; |
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 styled from "styled-components"; | ||
|
||
export const layout = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
width: 98%; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-top: 1.5rem; | ||
.progress { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 5px; | ||
margin-left: 1rem; | ||
} | ||
`; | ||
|
||
export const ProgressingBarWrapper = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
gap: 5px; | ||
max-width: 115px; | ||
`; | ||
export const ProgressContainr = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 3px; | ||
`; | ||
|
||
export const ShareContainr = styled.div` | ||
display: flex; | ||
gap: 5px; | ||
margin-right: 1rem; | ||
`; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,23 @@ | ||
import { useState, useEffect } from "react"; | ||
import { useParams } from "react-router-dom"; | ||
import { getStarContent } from "../apis/starP"; | ||
|
||
export const useMoveonStarP = () => { | ||
const [starP, setstarP] = useState(null); | ||
const { id } = useParams(); | ||
const fetchStarData = async () => { | ||
try { | ||
const res = await getStarContent(id); | ||
console.log("response:", res); | ||
setstarP(res); | ||
} catch (error) { | ||
console.error("error:", error); | ||
} | ||
}; | ||
|
||
useEffect(() => { | ||
fetchStarData(); | ||
}, []); | ||
|
||
return { starP }; //객체로 담아서 전달해주기 | ||
}; |
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
Oops, something went wrong.