Bugfix of setEdited, bordercolor swap

This commit is contained in:
Hollgy 2024-03-24 22:59:49 +01:00
parent 78ede1785a
commit ac71cbd9e2

View file

@ -22,11 +22,11 @@ export function PostSegment(props: { post: Post }): JSXElement {
createEffect((): void => {
setUpdatedAt(new Date(local.post.createdAt).toDateString());
setCreatedAT(new Date(local.post.updatedAt).toDateString());
setEdited(updatedAt() === createdAt());
setEdited(!(updatedAt() === createdAt()));
});
return (
<div class="card compact w-full flex-grow border-b-2 border-b-primary bg-base-200 text-base-content transition-all hover:bg-base-300">
<div class="card compact w-full flex-grow border-b-2 border-b-info bg-base-200 text-base-content transition-all hover:bg-base-300">
<div class="card-body md:mx-6">
<div class="flex flex-row justify-between">
<p class="text-xs">{createdAt()}</p>