fix: dashboard edit previews, migration journal, and notes comments
Register drizzle journal entries for 0022/0023 so prod migrations apply. Key edit-mode widget previews by index so bangs.stats shows live data. Add comments to notes detail pages.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { Suspense } from "react";
|
||||
import { getCurrentSession } from "@/lib/session";
|
||||
import { parseDashboardLayout, widgetContentKey } from "@/lib/dashboard";
|
||||
import { parseDashboardLayout, widgetContentIndexKey } from "@/lib/dashboard";
|
||||
import { readEditorDraftLayout } from "@/lib/dashboard-editor-draft";
|
||||
import { computeDefaultLayout, normalizeDashboardLayout } from "@/lib/dashboard.server";
|
||||
import { getWidget, getWidgetMetas } from "@/modules/_core";
|
||||
@@ -58,10 +58,10 @@ export default async function DashboardPage({
|
||||
if (isEditing) {
|
||||
const ctx = { userId: user.id, householdId: household.id };
|
||||
const widgetContents = Object.fromEntries(
|
||||
layout.widgets.map((placement) => [
|
||||
widgetContentKey(placement),
|
||||
layout.widgets.map((placement, index) => [
|
||||
widgetContentIndexKey(index),
|
||||
<DashboardWidgetContent
|
||||
key={widgetContentKey(placement)}
|
||||
key={widgetContentIndexKey(index)}
|
||||
placement={placement}
|
||||
ctx={ctx}
|
||||
/>,
|
||||
|
||||
Reference in New Issue
Block a user