forked from XiaoMo/ChatGPT-Next-Web
Merge pull request #2809 from kfear1337/auth-page
This commit is contained in:
commit
a7be4780ba
@ -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>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user