diff --git a/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx b/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx index 66c9d492e0..5e521aa1d6 100644 --- a/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx +++ b/packages/fakeyou/src/v2/view/tts/tts_model_list/TtsModelListPage.tsx @@ -109,14 +109,16 @@ function TtsModelListPage(props: Props) { setMaybeSelectedTtsModel, } = props; - const images = [ - "mascot/halloween_1.webp", - "mascot/halloween_2.webp", - "mascot/halloween_3.webp", - "mascot/kitsune_pose2.webp", - ]; + const randomImage = useMemo(() => { + const images = [ + "mascot/halloween_1.webp", + "mascot/halloween_2.webp", + "mascot/halloween_3.webp", + "mascot/kitsune_pose2.webp", + ]; - const randomImage = useMemo(() => images[Math.floor(Math.random() * images.length)], []); + return images[Math.floor(Math.random() * images.length)]; + }, []); const [maybeTtsError, setMaybeTtsError] = useState< GenerateTtsAudioErrorType | undefined