Last saved {distanceInWordsToNow(this.props.lastSaved)}
+Last saved {formatDistanceToNow(this.props.lastSaved)} ago
) : (Not saved yet
)} diff --git a/src/Explorer/Notebook/useNotebook.ts b/src/Explorer/Notebook/useNotebook.ts index 64acb2e3f..e42b8b9e4 100644 --- a/src/Explorer/Notebook/useNotebook.ts +++ b/src/Explorer/Notebook/useNotebook.ts @@ -1,7 +1,8 @@ import { isPublicInternetAccessAllowed } from "Common/DatabaseAccountUtility"; import { PhoenixClient } from "Phoenix/PhoenixClient"; import { cloneDeep } from "lodash"; -import create, { UseStore } from "zustand"; +import { create } from "zustand"; +import { subscribeWithSelector } from 'zustand/middleware'; import { AuthType } from "../../AuthType"; import * as Constants from "../../Common/Constants"; import { ConnectionStatusType, HttpStatusCodes } from "../../Common/Constants"; @@ -66,270 +67,274 @@ interface NotebookState { setIsPhoenixFeatures: (isPhoenixFeatures: boolean) => void; } -export const useNotebook: UseStore