Merge pull request #2809 from kfear1337/auth-page

This commit is contained in:
Yifei Zhang 2023-09-12 18:14:13 +08:00 committed by GitHub
commit a7be4780ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ export function AuthPage() {
const access = useAccessStore(); const access = useAccessStore();
const goHome = () => navigate(Path.Home); const goHome = () => navigate(Path.Home);
const resetAccessCode = () => access.updateCode(""); // Reset access code to empty string
useEffect(() => { useEffect(() => {
if (getClientConfig()?.isApp) { if (getClientConfig()?.isApp) {
@ -48,7 +49,10 @@ export function AuthPage() {
type="primary" type="primary"
onClick={goHome} onClick={goHome}
/> />
<IconButton text={Locale.Auth.Later} onClick={goHome} /> <IconButton text={Locale.Auth.Later} onClick={() => {
resetAccessCode();
goHome();
}} />
</div> </div>
</div> </div>
); );