Skip to content

Commit

Permalink
πŸš€ Deploy #51
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaem03 authored Nov 14, 2024
2 parents 6ed23da + 4a0886e commit 79aeb9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/rankingBox/RankingBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as S from "./styled";
export const RankingBox = ({ NuguIntroRank }) => {
const rank = [2, 1, 3];
const isNuguIntroRank =
NuguIntroRank && NuguIntroRank.length > 0 ? NuguIntroRank[0] : null;
Object.keys(NuguIntroRank).length > 0 ? NuguIntroRank : null;
return (
<S.RankingContainer>
{rank.map((item) => {
Expand Down
8 changes: 4 additions & 4 deletions src/pages/nuguIntro/NuguIntro.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getIntroList } from "@apis/nuguIntro";
export const NuguIntro = () => {
const { uuid } = useParams();
const navigate = useNavigate();
const [introList, setIntroList] = useState([]);
const [introList, setIntroList] = useState({});

useEffect(() => {
if (!uuid) return;
Expand All @@ -29,8 +29,8 @@ export const NuguIntro = () => {
fetchData();
}, [uuid]);

const isNuguIntro = introList && introList.length > 0 ? introList : null;

const isNuguIntro = Object.keys(introList).length > 0 ? introList : null;
console.log("isNuguIntro", isNuguIntro);
const moveOnintro = () => {
navigate(`/nuguIntro/write/${uuid}`);
};
Expand All @@ -40,7 +40,7 @@ export const NuguIntro = () => {
<NavigateBar />
<img src={BlueCloud} />
<S.RankingWrapper>
<RankingBox NuguIntroRank={introList} />
<RankingBox NuguIntroRank={isNuguIntro} />
<S.GoIntroConT>
<div id="gointro" onClick={() => moveOnintro()}>
λˆ„κ΅¬ μ†Œκ°œν•˜κΈ°
Expand Down

0 comments on commit 79aeb9f

Please sign in to comment.