feat: safe sort

This commit is contained in:
TrèsAbhi committed 2024-07-08 19:59:15 -05:00
1 parent 4d99e61bfb
commit f0fc23712a
13 files changed
+73 -65

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
import { TankFilters } from '../../stores/tankFilters';
import { TankDefinition } from './tankDefinitions';
export function filterTank(filters: TankFilters, tank: TankDefinition) {
+3 -3
View File
@@ -42,9 +42,9 @@ export function createNextSafeStore<Type>(initialState: Type) {
function useStore() {
const store = useContext(Context);
if (!store) {
throw new Error('useStoreContext must be used within Provider');
}
if (!store) throw new Error('useStore must be used within Provider');
return store;
}