//
// SPDX-License-Identifier: AGPL-3.0
+import { PropertyValue } from "~/models/search-bar";
+
export const formatDate = (isoDate?: string) => {
if (isoDate) {
const date = new Date(isoDate);
unit: "B"
}
];
+
+export const formatPropertyValue = (pv: PropertyValue) => {
+ if (pv.key) {
+ return pv.value
+ ? `${pv.key}: ${pv.value}`
+ : pv.key;
+ }
+ return "";
+};