session state simplification

This commit is contained in:
2026-01-12 09:24:58 -05:00
parent ed16b277f7
commit f68f1f462a
32 changed files with 132 additions and 381 deletions

View File

@@ -7,14 +7,14 @@ const DeletePostButton = lazy(() => import("./DeletePostButton"));
export interface CardProps {
post: PostCardData;
privilegeLevel: "anonymous" | "admin" | "user";
isAdmin: boolean;
index?: number;
}
export default function Card(props: CardProps) {
return (
<div class="bg-base border-text relative z-0 mx-auto h-96 w-full overflow-hidden rounded-lg border shadow-lg lg:w-5/6 xl:w-3/4">
<Show when={props.privilegeLevel === "admin"}>
<Show when={props.isAdmin}>
<div class="border-opacity-20 bg-opacity-40 border-text bg-text absolute top-0 w-full border-b px-2 py-4 backdrop-blur-md md:px-6">
<div class="flex justify-between">
<Show when={!props.post.published}>
@@ -60,7 +60,7 @@ export default function Card(props: CardProps) {
</div>
<CardLinks
postTitle={props.post.title}
privilegeLevel={props.privilegeLevel}
isAdmin={props.isAdmin}
postID={props.post.id}
/>
</div>