Skip to content

Commit

Permalink
Fix: 스타페이지 헤더 불러오기
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaem03 authored Aug 3, 2024
1 parent 9939a20 commit 07eb425
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/components/StarHeader/StarHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ import progressingBar from "../../assets/progressingBar.svg";
import completeBar from "../../assets/completeBar.svg";
import ShareIcon from "../../assets/shareIcon.svg";

const ProgressingBar = ({ userroutinecount, totalroutinecount }) => {
return (
<S.ProgressingBarWrapper>
{Array.from({ length: totalroutinecount }).map((_, index) => {
const imgSrc = index < userroutinecount ? completeBar : progressingBar;
return <img key={index} src={imgSrc} alt={`Progress ${index}`} />;
})}
</S.ProgressingBarWrapper>
);
};

export const StarHeader = ({ usercount, totalcount, completecount }) => {

const ProgressingBar = ({ userroutinecount, totalroutinecount }) => {
return (
<S.ProgressingBarWrapper>
{Array.from({ length: totalroutinecount }).map((_, index) => {
const imgSrc = index < userroutinecount ? completeBar : progressingBar;
return <img key={index} src={imgSrc} alt={`Progress ${index}`} />;
})}
</S.ProgressingBarWrapper>
);
};
return (
<>
<S.layout>
Expand Down

0 comments on commit 07eb425

Please sign in to comment.