feat: moved to astro

This commit is contained in:
TrèsAbhi committed 2024-09-14 18:32:36 -05:00
1 parent 292df5f5d9
commit a1721eb05e
150 files changed
+386 -363

No files matched your search

@@ -0,0 +1,26 @@
'use client';
import lodash from 'lodash';
import { create } from 'zustand';
import { persist, subscribeWithSelector } from 'zustand/middleware';
import { createContextualSafeStore } from '../core/zustand/createContextualSafeStore';
export type DeltaMode = 'none' | 'percentage' | 'absolute';
export interface ComparePersistent {
deltaMode: DeltaMode;
}
export const { Provider, use, useMutation, useStore } =
createContextualSafeStore(() =>
create<ComparePersistent>()(
persist(
subscribeWithSelector<ComparePersistent>(() => ({
deltaMode: 'none',
})),
{
name: 'compare',
merge: (a, b) => lodash.merge(b, a),
},
),
),
);