diff --git a/app/src/components/view/ranking/RankingListToday.tsx b/app/src/components/view/ranking/RankingListToday.tsx index e7c9166..9f12375 100644 --- a/app/src/components/view/ranking/RankingListToday.tsx +++ b/app/src/components/view/ranking/RankingListToday.tsx @@ -1,7 +1,10 @@ +import { Button } from "@/components/ui/button"; import type { ScoreDetail } from "@/types"; import { useCallback, useEffect, useState } from "react"; +import { useRouter } from "next/navigation"; import { LuClock } from "react-icons/lu"; import { MdOutlineImageSearch } from "react-icons/md"; +import PhotoCameraIcon from "../../../../public/icons/icon-photo-camera.svg"; const LoadingSpinner = () => (
@@ -15,6 +18,7 @@ const RankingListToday: React.FC<{ selectedTopic: number }> = ({ }) => { const [data, setData] = useState([]); const [isLoading, setIsLoading] = useState(true); + const router = useRouter(); // 日付をYYYY-MM-DD形式で取得する関数 const getDate = useCallback((daysOffset = 0): string => { @@ -65,6 +69,8 @@ const RankingListToday: React.FC<{ selectedTopic: number }> = ({ if (selectedTopic !== 0) { fetchData(getDate()); + } else { + setIsLoading(false); } }, [selectedTopic, getDate]); @@ -74,11 +80,20 @@ const RankingListToday: React.FC<{ selectedTopic: number }> = ({ if (!Array.isArray(data) || data.length === 0) { return ( -
- まだ投稿がありません!
- 1位になれるかも! +
+

まだ投稿がありません

+

今すぐ投稿して1位を目指しましょう!

+

+ あなたの投稿がトップに表示されるかも! +

+
); }