{JSON.stringify(email(), null, 4)}*/} -
+
- - {kind} -
- ) -} diff --git a/src/components/show/Show.tsx b/src/components/show/Show.tsx index 58ec390..8d2bd8c 100644 --- a/src/components/show/Show.tsx +++ b/src/components/show/Show.tsx @@ -1,4 +1,4 @@ -import { createEffect, createSignal, useContext } from "solid-js" +import { createEffect, createSignal, JSX, useContext } from "solid-js" import type { EmailRemainder } from "../../email" import { SelectedEmailContext } from "../App" import { fetch } from "../../services/fetch" @@ -27,10 +27,31 @@ export function Show({}: ShowProps) { if (e) getFullMail(e.id) }) + const hasAttachments = () => (emailRemainder()?.attachments?.length ?? 0) > 0 + + const bodyStyle = (): JSX.CSSProperties => ({ + "grid-template-columns": "1fr", + "grid-template-rows": hasAttachments() + ? "auto auto 60px 1fr" + : "auto 60px 1fr", + }) + return ( -