mirror of
https://github.com/0xShay/halflink.git
synced 2026-01-11 21:23:23 +00:00
Add frontend template with dummy data
This commit is contained in:
10
frontend/app/utils/shortenLink.ts
Normal file
10
frontend/app/utils/shortenLink.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export async function shortenLink(longUrl: string): Promise<{
|
||||
shortUrl: string;
|
||||
manageUrl: string;
|
||||
}> {
|
||||
let randomText = Math.random().toString(36).substring(2, 8);
|
||||
return {
|
||||
shortUrl: "https://halflink.example/" + randomText,
|
||||
manageUrl: "https://halflink.example/" + randomText + "/manage",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user