mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
interface: update state hooks to accomodate graph schema changes
This commit is contained in:
parent
5328aae1a6
commit
7161174ca5
@ -102,7 +102,7 @@ const mapifyChildren = (children) => {
|
||||
}));
|
||||
};
|
||||
|
||||
const pendingIndices = (json, state) => {
|
||||
const pendingIndices = (json, state: GraphState): GraphState => {
|
||||
const data = _.get(json, 'pending-indices', false);
|
||||
if (data) {
|
||||
Object.keys(data).forEach((key) => {
|
||||
|
@ -5,6 +5,7 @@ import { BaseState, createState } from "./base";
|
||||
export interface GraphState extends BaseState<GraphState> {
|
||||
graphs: Graphs;
|
||||
graphKeys: Set<string>;
|
||||
pendingIndices: Record<string, any>;
|
||||
// getKeys: () => Promise<void>;
|
||||
// getTags: () => Promise<void>;
|
||||
// getTagQueries: () => Promise<void>;
|
||||
@ -19,6 +20,7 @@ export interface GraphState extends BaseState<GraphState> {
|
||||
const useGraphState = createState<GraphState>('Graph', {
|
||||
graphs: {},
|
||||
graphKeys: new Set(),
|
||||
pendingIndices: {},
|
||||
// getKeys: async () => {
|
||||
// const api = useApi();
|
||||
// const keys = await api.scry({
|
||||
|
@ -8,7 +8,7 @@ import { StoreState } from '~/logic/store/type';
|
||||
import { RouteComponentProps } from 'react-router-dom';
|
||||
|
||||
import { LinkItem } from './components/LinkItem';
|
||||
import { LinkWindow } from './LinkWindow';
|
||||
import LinkWindow from './LinkWindow';
|
||||
import { Comments } from '~/views/components/Comments';
|
||||
|
||||
import './css/custom.css';
|
||||
|
Loading…
Reference in New Issue
Block a user