mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: upgrade EmbedBreakdown
This commit is contained in:
1 parent
d33990bdb4
commit
c2d625e1ed
3 files changed
+32
-48
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { type IndividualTankStats } from "@blitzkit/core";
|
||||
import { Varuna } from "varuna";
|
||||
|
||||
type EmbedBreakdown = Record<number, IndividualTankStats[]>;
|
||||
|
||||
export const EmbedBreakdown = new Varuna<EmbedBreakdown>(
|
||||
{},
|
||||
"embed-breakdown-2"
|
||||
);
|
||||
@@ -1,16 +0,0 @@
|
||||
import { type IndividualTankStats } from '@blitzkit/core';
|
||||
import * as lodash from 'lodash-es';
|
||||
import { create } from 'zustand';
|
||||
import { persist } from 'zustand/middleware';
|
||||
import { createContextualStore } from '../core/zustand/createContextualStore';
|
||||
|
||||
type EmbedBreakdownPersistentStore = Record<number, IndividualTankStats[]>;
|
||||
|
||||
export const EmbedBreakdownPersistent = createContextualStore(() =>
|
||||
create<EmbedBreakdownPersistentStore>()(
|
||||
persist(() => ({}), {
|
||||
name: 'embed-breakdown',
|
||||
merge: (a, b) => lodash.merge(b, a),
|
||||
}),
|
||||
),
|
||||
);
|
||||
Reference in new issue
Block a user