mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added lab sorting
This commit is contained in:
parent
566e1192cd
commit
948f3a7e04
7 changed files with 63 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
|||
import React, { createContext, FC, useContext } from 'react';
|
||||
|
||||
import { IFlowNode, ITag } from '~/types';
|
||||
import { ILabNode } from '~/types/lab';
|
||||
import { ILabNode, LabNodesSort } from '~/types/lab';
|
||||
|
||||
export interface LabContextProps {
|
||||
isLoading: boolean;
|
||||
|
@ -13,6 +13,8 @@ export interface LabContextProps {
|
|||
heroes: IFlowNode[];
|
||||
isLoadingStats: boolean;
|
||||
updates: IFlowNode[];
|
||||
sort: LabNodesSort;
|
||||
setSort: (sort: LabNodesSort) => void;
|
||||
}
|
||||
|
||||
const defaultValues: LabContextProps = {
|
||||
|
@ -24,6 +26,8 @@ const defaultValues: LabContextProps = {
|
|||
heroes: [],
|
||||
isLoadingStats: false,
|
||||
updates: [],
|
||||
sort: LabNodesSort.New,
|
||||
setSort: () => {},
|
||||
};
|
||||
|
||||
const LabContext = createContext<LabContextProps>(defaultValues);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue