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 /> <PersonalInfo />
<div className={'flex-spacer'} style={{ minHeight: 52 }} /> <div className={'flex-spacer'} style={{ minHeight: 52 }} />
<Suspense fallback={<span>Loading</span>}> <Suspense fallback={<span>Loading</span>}>
{!__DIY__ && <WxQrCode />} {!__DIY__ && !theme.pure && <WxQrCode />}
</Suspense> </Suspense>
{!__DIY__ && ( {!__DIY__ && (
<p <p

View File

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

View File

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