Explorar o código

Merge pull request #2809 from kfear1337/auth-page

Yifei Zhang hai 1 ano
pai
achega
a7be4780ba
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      app/components/auth.tsx

+ 5 - 1
app/components/auth.tsx

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