[WebUI] fixed a EDIT bug after 10 minutes (#2615)

After the page remains inactive for 10 minutes,
clicking on the edit page will result in a blank screen

when you click on edit after 10 minutes,
all user data is lost. After capturing the network packets,
it can be observed that the frontend sends a fresh request
to the backend for data, and the backend responds correctly,
but the page does not refresh correctly.

`function recent(fetchedAt) {
if (fetchedAt === null) return false;

const interval = 10 * 60 * 1000; // 10 minutes
return ((Date.now() - interval) < fetchedAt);
}`
This commit is contained in:
Sukchan Lee 2023-09-25 22:26:48 +09:00
parent 5623b1a0a1
commit 5a220f1a83
3 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ class Edit extends Component {
return (
<Form
visible={visible}
visible={isLoading ? false : visible}
title={(action === 'update') ? 'Edit Account' : 'Create Account'}
width="480px"
height="400px"

View File

@ -715,7 +715,7 @@ class Edit extends Component {
return (
<Form
visible={visible}
visible={isLoading ? false : visible}
title={(action === 'update') ? 'Edit Profile' : 'Create Profile'}
schema={this.state.schema}
uiSchema={this.state.uiSchema}

View File

@ -808,7 +808,7 @@ class Edit extends Component {
return (
<Form
visible={visible}
visible={isLoading ? false : visible}
title={(action === 'update') ? 'Edit Subscriber' : 'Create Subscriber'}
schema={this.state.schema}
uiSchema={this.state.uiSchema}