fixes and remove unused

This commit is contained in:
Anthony Stirling 2025-10-27 11:24:52 +00:00
parent b2a52eca79
commit a4fd02bc58
2 changed files with 1 additions and 10 deletions

View File

@ -10,7 +10,6 @@ import { useAuth } from '../../auth/UseSession';
interface FirstLoginModalProps {
opened: boolean;
onPasswordChanged: () => void;
username: string;
}
@ -20,7 +19,7 @@ interface FirstLoginModalProps {
* Forces first-time users to change their password.
* Cannot be dismissed until password is successfully changed.
*/
export default function FirstLoginModal({ opened, onPasswordChanged, username }: FirstLoginModalProps) {
export default function FirstLoginModal({ opened, username }: FirstLoginModalProps) {
const { t } = useTranslation();
const navigate = useNavigate();
const { signOut } = useAuth();

View File

@ -46,13 +46,6 @@ export default function Landing() {
checkFirstLogin()
}, [session, config])
const handlePasswordChanged = async () => {
// After password change, backend logs out the user
// Refresh session to detect logout and redirect to login
setIsFirstLogin(false) // Close modal first
await refreshSession()
// The auth system will automatically redirect to login when session is null
}
console.log('[Landing] State:', {
pathname: location.pathname,
@ -87,7 +80,6 @@ export default function Landing() {
<>
<FirstLoginModal
opened={isFirstLogin}
onPasswordChanged={handlePasswordChanged}
username={username}
/>
<HomePage />