Skip to content

Commit 660c2f8

Browse files
authored
BACKLOG-23532: make login work without js (#97)
1 parent f10d8fa commit 660c2f8

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/client/LoginComponent.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const LoginComponent = ({isLoggedIn, userHydrated, urls, mode, nodePath, isShowR
1111
const [user, setUser] = useState(userHydrated);
1212
const [loggedIn, setLoggedIn] = useState(isLoggedIn);
1313

14-
const showModal = () => {
14+
const showModal = event => {
15+
event.preventDefault();
1516
modalRef.current.showModal();
1617
};
1718

@@ -70,13 +71,15 @@ const LoginComponent = ({isLoggedIn, userHydrated, urls, mode, nodePath, isShowR
7071
/>
7172
</div>
7273
</dialog>
73-
<button
74-
type="button"
75-
className="d-block btn btn-link p-0 lux-capitalize border-0"
76-
onClick={showModal}
77-
>
78-
{t('login.login')}
79-
</button>
74+
<p>
75+
<a
76+
href={urls.loginUrl}
77+
className="lux-capitalize"
78+
onClick={showModal}
79+
>
80+
{t('login.login')}
81+
</a>
82+
</p>
8083
</>
8184
);
8285
};

0 commit comments

Comments
 (0)