mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-16 04:33:50 +08:00
fix: login page flag icon preload (#1393)
This commit is contained in:
@ -69,6 +69,12 @@ class LoginPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
Setting.Countries.forEach((country) => {
|
||||
new Image().src = `${Setting.StaticBaseUrl}/flag-icons/${country.country}.svg`;
|
||||
});
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState, snapshot) {
|
||||
if (this.state.application && !prevState.application) {
|
||||
const defaultCaptchaProviderItems = this.getDefaultCaptchaProviderItems(this.state.application);
|
||||
|
Reference in New Issue
Block a user