add: new list layout design

New design, custom uuid, better handling of swipe
This commit is contained in:
Fiona Lena Urban 2025-05-10 13:32:28 +02:00
parent 628659c39d
commit 11bcdce6cb
7 changed files with 21 additions and 36 deletions

View file

@ -1,3 +1,5 @@
export const replaceComma = (value: string | number) => `${value}`.replace(',', '.')
export const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max)
export const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max)
export const between = (value: number, min: number, max: number) => value >= min && value <= max

7
app/utils/uuid.ts Normal file
View file

@ -0,0 +1,7 @@
export const randomUUID = (): string => {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = Math.random() * 16 | 0;
const v = c === 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
})
}