|
@@ -20,8 +20,6 @@ function useHistory() {
|
|
|
const [nextBeforeTimestamp, setNextBeforeTimestamp] =
|
|
const [nextBeforeTimestamp, setNextBeforeTimestamp] =
|
|
|
useState<HistoryContextValue['nextBeforeTimestamp']>(null)
|
|
useState<HistoryContextValue['nextBeforeTimestamp']>(null)
|
|
|
const [atEnd, setAtEnd] = useState<HistoryContextValue['atEnd']>(false)
|
|
const [atEnd, setAtEnd] = useState<HistoryContextValue['atEnd']>(false)
|
|
|
- const [showOnlyLabels, setShowOnlyLabels] =
|
|
|
|
|
- useState<HistoryContextValue['showOnlyLabels']>(false)
|
|
|
|
|
const [userHasFullFeature, setUserHasFullFeature] =
|
|
const [userHasFullFeature, setUserHasFullFeature] =
|
|
|
useState<HistoryContextValue['userHasFullFeature']>(undefined)
|
|
useState<HistoryContextValue['userHasFullFeature']>(undefined)
|
|
|
const [freeHistoryLimitHit, setFreeHistoryLimitHit] =
|
|
const [freeHistoryLimitHit, setFreeHistoryLimitHit] =
|
|
@@ -44,12 +42,8 @@ function useHistory() {
|
|
|
})
|
|
})
|
|
|
/* eslint-enable no-unused-vars */
|
|
/* eslint-enable no-unused-vars */
|
|
|
|
|
|
|
|
- const {
|
|
|
|
|
- isLoading: loading,
|
|
|
|
|
- error,
|
|
|
|
|
- data,
|
|
|
|
|
- runAsync,
|
|
|
|
|
- } = useAsync<{ updates: Update[] }>()
|
|
|
|
|
|
|
+ const { isLoading, isError, error, data, runAsync } =
|
|
|
|
|
+ useAsync<{ updates: Update[] }>()
|
|
|
const updates = useMemo(() => data?.updates ?? [], [data?.updates])
|
|
const updates = useMemo(() => data?.updates ?? [], [data?.updates])
|
|
|
const loadingFileTree = true
|
|
const loadingFileTree = true
|
|
|
|
|
|
|
@@ -92,13 +86,13 @@ function useHistory() {
|
|
|
() => ({
|
|
() => ({
|
|
|
atEnd,
|
|
atEnd,
|
|
|
error,
|
|
error,
|
|
|
|
|
+ isError,
|
|
|
|
|
+ isLoading,
|
|
|
freeHistoryLimitHit,
|
|
freeHistoryLimitHit,
|
|
|
- loading,
|
|
|
|
|
labels,
|
|
labels,
|
|
|
loadingFileTree,
|
|
loadingFileTree,
|
|
|
nextBeforeTimestamp,
|
|
nextBeforeTimestamp,
|
|
|
selection,
|
|
selection,
|
|
|
- showOnlyLabels,
|
|
|
|
|
updates,
|
|
updates,
|
|
|
userHasFullFeature,
|
|
userHasFullFeature,
|
|
|
viewMode,
|
|
viewMode,
|
|
@@ -111,13 +105,13 @@ function useHistory() {
|
|
|
[
|
|
[
|
|
|
atEnd,
|
|
atEnd,
|
|
|
error,
|
|
error,
|
|
|
|
|
+ isError,
|
|
|
|
|
+ isLoading,
|
|
|
freeHistoryLimitHit,
|
|
freeHistoryLimitHit,
|
|
|
- loading,
|
|
|
|
|
labels,
|
|
labels,
|
|
|
loadingFileTree,
|
|
loadingFileTree,
|
|
|
nextBeforeTimestamp,
|
|
nextBeforeTimestamp,
|
|
|
selection,
|
|
selection,
|
|
|
- showOnlyLabels,
|
|
|
|
|
updates,
|
|
updates,
|
|
|
userHasFullFeature,
|
|
userHasFullFeature,
|
|
|
viewMode,
|
|
viewMode,
|