Move databases to zustand (#898)

This commit is contained in:
victor-meng
2021-06-18 11:25:08 -07:00
committed by GitHub
parent c9fa44f6f4
commit 96e6bba38b
33 changed files with 310 additions and 446 deletions

View File

@@ -22,6 +22,7 @@ import { FeaturePanelLauncher } from "../Controls/FeaturePanel/FeaturePanelLaunc
import { DataSamplesUtil } from "../DataSamples/DataSamplesUtil";
import Explorer from "../Explorer";
import * as MostRecentActivity from "../MostRecentActivity/MostRecentActivity";
import { useDatabases } from "../useDatabases";
export interface SplashScreenItem {
iconSrc: string;
@@ -308,8 +309,8 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
title: collectionId,
description: "Data",
onClick: () => {
const collection = this.container.findCollection(databaseId, collectionId);
collection && collection.openTab();
const collection = useDatabases.getState().findCollection(databaseId, collectionId);
collection?.openTab();
},
};
}