Skip to content

Commit

Permalink
Check empty password on password-prompt page load so that rooms witho…
Browse files Browse the repository at this point in the history
…ut password can be immediately accessed (#2421)

Check empty password on page load
  • Loading branch information
Cosmin-Mare authored Oct 9, 2024
1 parent e0d4f75 commit 8cfc6cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/popups-etc/room-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import styles from './share-room.module.css'
import { PersistenceState } from '../../lib/state'
import { Game } from '../../lib/game-saving/account'
import { PersistenceStateKind } from '../../lib/state'
import { useEffect } from 'preact/hooks'

export interface RoomPasswordPopupProps {
persistenceState: Signal<PersistenceState>
Expand All @@ -31,6 +32,7 @@ export default function RoomPasswordPopup(props: RoomPasswordPopupProps) {
}
});
}
useEffect(checkPassword, [])
return (
<div class={styles.overlay}>
<div class={styles.modal}>
Expand Down

0 comments on commit 8cfc6cd

Please sign in to comment.