mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-22 05:16:23 +02:00
✨ Allow users to log in with magic link (#553)
This commit is contained in:
parent
5b78093c6f
commit
2cf9ad467c
17 changed files with 425 additions and 186 deletions
|
@ -1 +1,2 @@
|
|||
export * from "./src/absolute-url";
|
||||
export * from "./src/prevent-widows";
|
||||
|
|
7
packages/utils/src/prevent-widows.ts
Normal file
7
packages/utils/src/prevent-widows.ts
Normal 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");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue