refactor: page item

This commit is contained in:
Aslam H
2024-10-22 21:06:13 +07:00
parent 53b67ae82c
commit 58af4100b0
2 changed files with 13 additions and 16 deletions

View File

@@ -52,22 +52,19 @@ export const PageItem = React.forwardRef<HTMLAnchorElement, PageItemProps>(
</Column.Text>
</Column.Wrapper>
<Column.Wrapper style={columnStyles.topic}>
{page.topic && (
<Badge variant="secondary">{page.topic.prettyName}</Badge>
)}
</Column.Wrapper>
{!isTablet && (
<Column.Wrapper style={columnStyles.topic}>
{page.topic && (
<Badge variant="secondary">{page.topic.prettyName}</Badge>
)}
<Column.Wrapper style={columnStyles.updated}>
<Column.Text>
{format(new Date(page.updatedAt), "d MMM yyyy")}
</Column.Text>
</Column.Wrapper>
)}
<Column.Wrapper
style={columnStyles.updated}
className="flex justify-end"
>
<Column.Text className="text-sm">
{format(new Date(page.updatedAt), "d MMM yyyy")}
</Column.Text>
</Column.Wrapper>
</div>
</Link>
)

View File

@@ -99,9 +99,9 @@ export const useColumnStyles = () => {
"--max-width": "120px",
},
updated: {
"--width": "82px",
"--min-width": "82px",
"--max-width": "82px",
"--width": "65px",
"--min-width": "120px",
"--max-width": "120px",
},
}
}