diff options
| author | Dhravya <[email protected]> | 2024-04-03 00:24:05 -0700 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-04-03 00:24:05 -0700 |
| commit | 20febf888b6ca42fba462390f723573807aef502 (patch) | |
| tree | a7e157c07d3868a4e42135a91aeb8606781251db /apps/web/src/lib | |
| parent | update: catch up with main (diff) | |
| parent | responsiveness (diff) | |
| download | archived-supermemory-20febf888b6ca42fba462390f723573807aef502.tar.xz archived-supermemory-20febf888b6ca42fba462390f723573807aef502.zip | |
uptodate with main
Diffstat (limited to 'apps/web/src/lib')
| -rw-r--r-- | apps/web/src/lib/utils.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/web/src/lib/utils.ts b/apps/web/src/lib/utils.ts index 6b8f3fd9..c6678e4b 100644 --- a/apps/web/src/lib/utils.ts +++ b/apps/web/src/lib/utils.ts @@ -1,4 +1,3 @@ -"use client"; import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; @@ -17,3 +16,11 @@ export function cleanUrl(url: string) { ? url.slice(7) : url; } + +export function generateId() { + return Math.random().toString(36).slice(2, 9); +} + +export function svgId(prefix: string, id: string) { + return `${prefix}-${id}`; +} |