Skip to content

Issue #45: Instagram Post Create & Edit Routes #151

@wumibals

Description

@wumibals

Labels: frontend admin instagram routing
Area: frontend/app/(auth)/admin/instagram/new/page.tsx, frontend/app/(auth)/admin/instagram/[id]/page.tsx
Difficulty: Intermediate

Description

The Instagram section needs create and edit route pages that both wrap the shared InstagramForm component. The edit page fetches the existing post by ID; the create page passes no initial data.

Acceptance Criteria

  • Create frontend/app/(auth)/admin/instagram/new/page.tsx:
    • Server component with metadata: { title: "Add Instagram Post" }
    • Renders <InstagramForm mode="create" />
  • Create frontend/app/(auth)/admin/instagram/[id]/page.tsx:
    • "use client" component
    • Reads id from useParams
    • Fetches post by ID via TanStack Query
    • Renders <InstagramForm mode="edit" initialData={post} /> once loaded
    • Shows loading and error states
  • Both pages redirect to /admin/instagram after successful submission (handled inside InstagramForm)

Technical Notes

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions