Replace react-spring with motion, fix breaking changes in react-window/date-fns-tz/pure-rand.
This commit is contained in:
1 parent
df29c16c00
commit
cc829c8f6f
9 files changed
+132
-110
No files matched your search
+2
-2
@@ -38,7 +38,7 @@ import {
|
||||
subWeeks,
|
||||
subYears,
|
||||
} from 'date-fns';
|
||||
import { utcToZonedTime } from 'date-fns-tz';
|
||||
import { toZonedTime } from 'date-fns-tz';
|
||||
import { getDateLocale } from '@/lib/lang';
|
||||
import type { DateRange } from '@/lib/types';
|
||||
|
||||
@@ -164,7 +164,7 @@ export function parseDateRange(
|
||||
}
|
||||
|
||||
const date = new Date();
|
||||
const now = timezone ? utcToZonedTime(date, timezone) : date;
|
||||
const now = timezone ? toZonedTime(date, timezone) : date;
|
||||
const dateLocale = getDateLocale(locale);
|
||||
const { num = 1, unit } = parseDateValue(value);
|
||||
|
||||
|
||||
+4
-3
@@ -1,10 +1,11 @@
|
||||
import prand from 'pure-rand';
|
||||
import { uniformInt } from 'pure-rand/distribution/uniformInt';
|
||||
import { xoroshiro128plus } from 'pure-rand/generator/xoroshiro128plus';
|
||||
|
||||
const seed = Date.now() ^ (Math.random() * 0x100000000);
|
||||
const rng = prand.xoroshiro128plus(seed);
|
||||
const rng = xoroshiro128plus(seed);
|
||||
|
||||
export function random(min: number, max: number) {
|
||||
return prand.unsafeUniformIntDistribution(min, max, rng);
|
||||
return uniformInt(rng, min, max);
|
||||
}
|
||||
|
||||
export function getRandomChars(
|
||||
|
||||
Reference in new issue
Block a user