Skip to content

Commit 74f2866

Browse files
committed
fix: use text has state
1 parent ce716a3 commit 74f2866

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

frontend/app/routes/_index.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ export default function Index() {
7474
const navigation = useNavigation();
7575
const submit = useSubmit();
7676

77+
const [currentRecordingText] = useState(
78+
[
79+
"そんなこともよーせんのか。あかんたれやなー",
80+
"あんじょーたのんまっさ",
81+
"そんなところまでいかーしめへんやろ",
82+
"いてるかいてへんかしらんけどいっぺん電話してみたらどないや",
83+
"ほんまにそんなことあるんかいな",
84+
][Math.floor(Math.random() * 5)],
85+
);
7786
const [recordingState, setRecordingState] = useState<RecordingState>("idle");
7887
const [error, setError] = useState<string | undefined>();
7988

@@ -177,15 +186,7 @@ export default function Index() {
177186
</div>
178187
</div>
179188
<div className="text-xl tracking-[-0.6px] text-[#f7bb43] lg:text-4xl lg:text-center">
180-
{
181-
[
182-
"そんなこともよーせんのか。あかんたれやなー",
183-
"あんじょーたのんまっさ",
184-
"そんなところまでいかーしめへんやろ",
185-
"いてるかいてへんかしらんけどいっぺん電話してみたらどないや",
186-
"ほんまにそんなことあるんかいな",
187-
][Math.floor(Math.random() * 5)]
188-
}
189+
{currentRecordingText}
189190
</div>
190191
<div className="relative flex w-full flex-col items-center justify-end gap-[12px]">
191192
<div className="relative flex w-full h-[90px] items-center justify-center overflow-visible">

0 commit comments

Comments
 (0)