+ {/* Type picker */}
+
+
+
+
+ {selectedMeta ? (
+
+
+ {selectedMeta.label}
+
+ ) : (
+ Select a milestone…
+ )}
+
+
+
+ {USER_INITIATED_MILESTONE_TYPES.map((type) => {
+ const meta = MILESTONE_META[type];
+ const Icon = meta.icon;
+ return (
+
+ );
+ })}
+
+
+
+
+ {/* Notes — only for LITTER (D-09) */}
+ {selectedType === MilestoneType.LITTER && (
+
+
+
+ )}
+
+ {/* Optional photo */}
+
+
+
+ {!previewUrl ? (
+
+ ) : (
+
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+

+ {uploadState === "uploading" && (
+
+
+ {uploadProgress}%
+
+ )}
+ {uploadState === "ready" && (
+
+ )}
+
+ )}
+ {uploadError &&
{uploadError}
}
+
+
+ {/* Optional caption */}
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/post-creation/PostTypeSheet.tsx b/src/components/post-creation/PostTypeSheet.tsx
index 9044496..fd3a2cc 100644
--- a/src/components/post-creation/PostTypeSheet.tsx
+++ b/src/components/post-creation/PostTypeSheet.tsx
@@ -17,6 +17,7 @@ import {
import { Button } from "@/components/ui/button";
import { PhotoPostForm } from "@/components/post-creation/PhotoPostForm";
import { StoryForm } from "@/components/stories/StoryForm";
+import { MilestoneForm } from "@/components/post-creation/MilestoneForm";
/**
* PostTypeSheet — bottom Sheet with 3 post type choices (D-01).
@@ -56,6 +57,11 @@ export function PostTypeSheet({ open, onOpenChange }: PostTypeSheetProps) {
setSelectedType(null);
}
+ function handleMilestoneClose() {
+ setMilestoneDialogOpen(false);
+ setSelectedType(null);
+ }
+
function handleSelectType(type: PostType) {
setSelectedType(type);
onOpenChange(false); // close the Sheet
@@ -137,16 +143,13 @@ export function PostTypeSheet({ open, onOpenChange }: PostTypeSheetProps) {
- {/* Milestone Dialog seam — TODO(02-06): replace null with MilestoneForm */}
+ {/* Milestone Dialog (D-02) */}