diff --git a/services/web/frontend/js/features/history/context/history-context.tsx b/services/web/frontend/js/features/history/context/history-context.tsx
index b37325bd6c..0a6c23e554 100644
--- a/services/web/frontend/js/features/history/context/history-context.tsx
+++ b/services/web/frontend/js/features/history/context/history-context.tsx
@@ -97,6 +97,9 @@ function useHistory() {
setUpdates(updates.concat(loadedUpdates))
// TODO first load
+ // if (firstLoad) {
+ // _handleHistoryUIStateChange()
+ // }
}
if (atEnd) return
@@ -192,9 +195,11 @@ function useHistory() {
isLoading,
freeHistoryLimitHit,
labels,
+ setLabels,
loadingFileTree,
nextBeforeTimestamp,
updates,
+ setUpdates,
userHasFullFeature,
projectId,
fileSelection,
@@ -208,9 +213,11 @@ function useHistory() {
isLoading,
freeHistoryLimitHit,
labels,
+ setLabels,
loadingFileTree,
nextBeforeTimestamp,
updates,
+ setUpdates,
userHasFullFeature,
projectId,
fileSelection,
diff --git a/services/web/frontend/js/features/history/context/types/history-context-value.ts b/services/web/frontend/js/features/history/context/types/history-context-value.ts
index 48e8537cd2..9917d85d8b 100644
--- a/services/web/frontend/js/features/history/context/types/history-context-value.ts
+++ b/services/web/frontend/js/features/history/context/types/history-context-value.ts
@@ -5,6 +5,9 @@ import { FileSelection } from '../../services/types/file'
export type HistoryContextValue = {
updates: LoadedUpdate[]
+ setUpdates: React.Dispatch<
+ React.SetStateAction
+ >
nextBeforeTimestamp: number | undefined
atEnd: boolean
userHasFullFeature: boolean | undefined
@@ -12,6 +15,7 @@ export type HistoryContextValue = {
isLoading: boolean
error: Nullable
labels: Nullable
+ setLabels: React.Dispatch>
loadingFileTree: boolean
projectId: string
fileSelection: FileSelection | null
diff --git a/services/web/frontend/js/features/history/utils/label.ts b/services/web/frontend/js/features/history/utils/label.ts
index dd1db5e7ff..5ca8c7513d 100644
--- a/services/web/frontend/js/features/history/utils/label.ts
+++ b/services/web/frontend/js/features/history/utils/label.ts
@@ -12,6 +12,10 @@ export const isPseudoLabel = (
return (label as PseudoCurrentStateLabel).isPseudoCurrentStateLabel === true
}
+export const isLabel = (label: LoadedLabel): label is Label => {
+ return !isPseudoLabel(label)
+}
+
const sortLabelsByVersionAndDate = (labels: LoadedLabel[]) => {
return orderBy(
labels,
diff --git a/services/web/frontend/js/shared/components/badge.tsx b/services/web/frontend/js/shared/components/badge.tsx
index 2b841f0083..94456525d8 100644
--- a/services/web/frontend/js/shared/components/badge.tsx
+++ b/services/web/frontend/js/shared/components/badge.tsx
@@ -7,7 +7,7 @@ type BadgeProps = MergeAndOverride<
prepend?: React.ReactNode
children: React.ReactNode
className?: string
- showCloseButton?: boolean
+ closeButton?: boolean
onClose?: (e: React.MouseEvent) => void
closeBtnProps?: React.ComponentProps<'button'>
}
@@ -17,7 +17,7 @@ function Badge({
prepend,
children,
className,
- showCloseButton = false,
+ closeButton = false,
onClose,
closeBtnProps,
...rest
@@ -26,7 +26,7 @@ function Badge({
{prepend}
{children}
- {showCloseButton && (
+ {closeButton && (