Allow users to log in with magic link (#553)

This commit is contained in:
Luke Vella 2023-03-13 15:49:12 +00:00 committed by GitHub
parent 5b78093c6f
commit 2cf9ad467c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 425 additions and 186 deletions

View file

@ -1 +1,2 @@
export * from "./src/absolute-url";
export * from "./src/prevent-widows";

View file

@ -0,0 +1,7 @@
export function preventWidows(text = "") {
if (text.split(" ").length < 3) {
return text;
}
const index = text.lastIndexOf(" ");
return [text.substring(0, index), text.substring(index + 1)].join("\u00a0");
}