fix: 纯净模式隐藏二维码

This commit is contained in:
streakingman 2022-10-13 20:07:10 +08:00
parent 5353a40416
commit 3913982716
3 changed files with 5 additions and 3 deletions

View File

@ -90,7 +90,7 @@ const App: FC<{ theme: Theme<any> }> = ({ theme: initTheme }) => {
<PersonalInfo />
<div className={'flex-spacer'} style={{ minHeight: 52 }} />
<Suspense fallback={<span>Loading</span>}>
{!__DIY__ && <WxQrCode />}
{!__DIY__ && !theme.pure && <WxQrCode />}
</Suspense>
{!__DIY__ && (
<p

View File

@ -497,6 +497,7 @@ const Game: FC<{
time={usedTime}
score={score}
success={level === maxLevel}
pure={theme.pure}
restartMethod={restart}
/>
)}

View File

@ -37,8 +37,9 @@ const Score: FC<{
score: number;
time: number;
success: boolean;
pure?: boolean;
restartMethod: () => void;
}> = ({ level, score, time, success, restartMethod }) => {
}> = ({ level, score, time, success, restartMethod, pure = false }) => {
const [rankList, setRankList] = useState<RankInfo[]>([]);
const [username, setUsername] = useState<string>(
localStorage.getItem(USER_NAME_STORAGE_KEY) || ''
@ -281,7 +282,7 @@ const Score: FC<{
</button>
</div>
)}
<WxQrCode />
{!pure && <WxQrCode />}
</div>
</div>
);