From 850884cd28b149b9d08761c92ec8628902e06ca7 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Wed, 16 Aug 2023 00:31:18 +0900 Subject: [PATCH] =?UTF-8?q?=EF=BC=92=E5=91=A8=E5=B9=B4=E3=82=A4=E3=83=A9?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E3=83=88=E3=83=83=E3=83=97=E7=B5=B5?= =?UTF-8?q?=E3=81=AB=20(#161)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dormitoryTopIllustContainer.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/dormitoryTopIllustContainer.tsx b/src/components/dormitoryTopIllustContainer.tsx index b35fade9b..12e924255 100644 --- a/src/components/dormitoryTopIllustContainer.tsx +++ b/src/components/dormitoryTopIllustContainer.tsx @@ -1,6 +1,6 @@ import { graphql, useStaticQuery } from "gatsby" import { GatsbyImage, IGatsbyImageData } from "gatsby-plugin-image" -import React, { useEffect, useState } from "react" +import React, { useState } from "react" import "../components/layout.scss" export default () => { @@ -28,12 +28,12 @@ export default () => { const [topIllust, setTopIllust] = useState( topIllusts[topIllusts.length - 1] ) - useEffect(() => { - // トップイラストを後ろ2枚からランダムに選択 - // FIXME: なぜかリロードしても変わらない - const randomIndex = topIllusts.length - 1 - Math.floor(Math.random() * 2) - setTopIllust(topIllusts[randomIndex]) - }, []) + // useEffect(() => { + // // トップイラストを後ろ2枚からランダムに選択 + // // FIXME: なぜかリロードしても変わらない + // const randomIndex = topIllusts.length - 1 - Math.floor(Math.random() * 2) + // setTopIllust(topIllusts[randomIndex]) + // }, []) return ( <>