diff --git a/src/entities/card/organisms/card-preview.tsx b/src/entities/card/organisms/card-preview.tsx
index f1c0dd53..8dcc4eb5 100644
--- a/src/entities/card/organisms/card-preview.tsx
+++ b/src/entities/card/organisms/card-preview.tsx
@@ -65,18 +65,12 @@ export const CardPreview = ({
aria-label="Open card"
>
- {size === 'small' && }
+ {size === 'small' && }
);
};
@@ -123,32 +117,31 @@ const PaperContainerStyled = styled(PaperContainer)<{
}
`;
-type ContentProps = Pick &
- Pick;
+type ContentProps = { card: Card } & Pick;
-const Content = ({ content, title, href, size, updatedAt }: ContentProps) => {
+const Content = ({ card, size, href }: ContentProps) => {
return (
{/* FIXME: Add text-overflow processing */}
{href && (
-
+
)}
- {!href && title}
+ {!href && card.title}
{size === 'large' && (
<>
-
+
{/* FIXME: resolve better later */}
-
+
>
)}
{size === 'small' && (
{/* FIXME: resolve better later */}
-
+
)}
@@ -177,15 +170,14 @@ const ItemEditorContainer = styled.div`
display: flex;
max-height: 122px;
`;
-
-type MetaProps = Pick;
-
-const Meta = ({ updatedAt }: MetaProps) => {
- const date = dayjs(updatedAt);
+const Meta: React.FC<{ card: Card }> = ({ card }) => {
+ const date = dayjs(card.updatedAt);
+ const isJustCreated = card.updatedAt === card.createdAt;
+ const label = isJustCreated ? 'Created' : 'Updated';
return (
- Updated {date.fromNow()}
+ {label} {date.fromNow()}
);