1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

First-pass for Compound styles

This commit is contained in:
Germain
2023-06-07 12:07:01 +01:00
committed by Quentin Gliech
parent dfdfc25d00
commit 33da9f05fe
17 changed files with 493 additions and 259 deletions

View File

@@ -149,11 +149,15 @@ export const Link: React.FC<
return (
<a
href={path}
onClick={(e) => {
e.preventDefault();
startTransition(() => {
setRoute(route);
});
onClick={(e: React.MouseEvent) => {
// Local links should be handled by the internal routers
// external links do not require a transition
if (!path.startsWith("http")) {
e.preventDefault();
startTransition(() => {
setRoute(route);
});
}
}}
{...props}
>