flotilla/src/app/components/NoteContentGoal.svelte

21 lines
713 B
Svelte
Raw Normal View History

2025-10-06 18:23:19 +00:00
<script lang="ts">
import type {ComponentProps} from "svelte"
2026-07-28 16:16:26 +00:00
import {ZapGoal} from "@welshman/domain"
import {reader} from "@app/core"
2025-10-06 18:23:19 +00:00
import Content from "@app/components/Content.svelte"
import GoalSummary from "@app/components/GoalSummary.svelte"
const props: ComponentProps<typeof Content> = $props()
2026-07-28 16:16:26 +00:00
const goal = reader(ZapGoal)(props.event)
const title = goal.title()
const summaryEvent = $derived({content: goal.summary(), tags: props.event.tags})
2025-10-06 18:23:19 +00:00
</script>
<div class="flex flex-col gap-2">
2026-07-28 16:16:26 +00:00
<p class="text-2xl">{title}</p>
<Content {...props} event={summaryEvent} expandMode="inline" minLength={50} maxLength={300} />
2025-10-06 18:23:19 +00:00
<GoalSummary url={props.url} event={props.event} />
</div>