diff --git a/src/js/components/AllPagesTable/AllPagesTable.tsx b/src/js/components/AllPagesTable/AllPagesTable.tsx
index acf05b8744..b75ad72036 100644
--- a/src/js/components/AllPagesTable/AllPagesTable.tsx
+++ b/src/js/components/AllPagesTable/AllPagesTable.tsx
@@ -11,20 +11,39 @@ const DISPLAY_TITLES = {
}
+// react-window adds style props to the children, but
+// we don't want all of them, and we'd rather not
+// override them below.
+const removedStyleKeys = ['left', 'right', 'width'];
+const filterStyle = (style) => Object.keys(style).reduce((acc, key) => {
+ if (!removedStyleKeys.includes(key)) {
+ acc[key] = style[key];
+ }
+ return acc;
+}, {});
+
+
+const renderDate = (date) => {
+ if (typeof date === 'string') {
+ return date
+ } else {
+ return "—"
+ }
+}
+
+
const Row = ({ index, data, style }) => {
const item = data[index];
- console.log(item)
+
return (
{
|
{item[":block/_refs"]?.length || 0} |
- {item[":edit/time"]} |
- {item[":create/time"]} |
+ {renderDate(item[":edit/time"])} |
+ {renderDate(item[":create/time"])} |
)
};
@@ -86,18 +105,19 @@ export const AllPagesTable = ({ sortedPages, onClickItem, sortedBy, sortDirectio
return
*:nth-child(1)": {
- flex: "0 0 calc(100% - 35rem)"
+ flex: "0 0 calc(100% - 39rem)"
},
"tr > *:nth-child(2)": {
flex: "0 0 7rem",
@@ -105,12 +125,12 @@ export const AllPagesTable = ({ sortedPages, onClickItem, sortedBy, sortDirectio
fontSize: "sm"
},
"tr > *:nth-child(3)": {
- flex: "0 0 14rem",
+ flex: "0 0 16rem",
color: "foreground.secondary",
fontSize: "sm"
},
"tr > *:nth-child(4)": {
- flex: "0 0 14rem",
+ flex: "0 0 16rem",
color: "foreground.secondary",
fontSize: "sm"
},
@@ -119,8 +139,8 @@ export const AllPagesTable = ({ sortedPages, onClickItem, sortedBy, sortDirectio
{columns.map((column, index) => {