Commit 45cf8ef3 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'fix/translate' into 'main'

修复翻译开启下的页面崩溃

See merge request !359
parents 8f6f971f 80e40018
Pipeline #26256 passed with stages
in 7 minutes and 29 seconds
...@@ -22,7 +22,7 @@ const RegexWrapper: React.FC<{ ...@@ -22,7 +22,7 @@ const RegexWrapper: React.FC<{
Wrapper: React.FunctionComponent<any>; Wrapper: React.FunctionComponent<any>;
}> = ({ text, re, Wrapper }) => { }> = ({ text, re, Wrapper }) => {
const matches = text.match(re); const matches = text.match(re);
if (!matches) return <>{text}</>; if (!matches) return <span>{text}</span>;
const sepRe = new RegExp( const sepRe = new RegExp(
matches?.reduce((acc, cur) => `${acc}|${cur}`) ?? "", matches?.reduce((acc, cur) => `${acc}|${cur}`) ?? "",
); );
......
...@@ -360,7 +360,7 @@ const ActionButton: React.FC<{ ...@@ -360,7 +360,7 @@ const ActionButton: React.FC<{
{stage === RoomStage.WAITING ? ( {stage === RoomStage.WAITING ? (
<> <>
<IconFont type="icon-play" size={12} /> <IconFont type="icon-play" size={12} />
开始游戏 <span>开始游戏</span>
</> </>
) : stage === RoomStage.HAND_SELECTING ? ( ) : stage === RoomStage.HAND_SELECTING ? (
<> <>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment