From 639b1a3db11d3f21d88e39e8408fadab7dfa4121 Mon Sep 17 00:00:00 2001 From: streakingman Date: Wed, 12 Oct 2022 23:44:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E8=A1=8C=E6=A6=9C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Score.module.scss | 4 ++++ src/components/Score.tsx | 15 ++++++++++----- src/themes/default/index.ts | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/Score.module.scss b/src/components/Score.module.scss index 6f06791..d2bb4f6 100644 --- a/src/components/Score.module.scss +++ b/src/components/Score.module.scss @@ -71,6 +71,10 @@ top: 0; background-color: gray; } + + td.username { + word-break: break-all; + } } } diff --git a/src/components/Score.tsx b/src/components/Score.tsx index 09cf086..ca752d9 100644 --- a/src/components/Score.tsx +++ b/src/components/Score.tsx @@ -98,7 +98,7 @@ const Score: FC<{ setTimeout(() => { const rankEl = document.getElementById(_userId + 'el'); rankEl?.scrollIntoView({ behavior: 'smooth' }); - }); + }, 1000); } }) .catch((e) => { @@ -107,7 +107,7 @@ const Score: FC<{ }; const onConfirmNameClick = () => { - const inputUsername = usernameInputRef.current?.value; + const inputUsername = usernameInputRef.current?.value.trim(); if (!inputUsername) return; const newUserId = randomString(8); setUsername(inputUsername); @@ -174,7 +174,11 @@ const Score: FC<{ return (
- fireworks}> + 🎆fireworks🎆 + } + > {success && }
@@ -203,6 +207,7 @@ const Score: FC<{