🔧 Title:
refactor(freelancer): extract inline logic/components from service, portfolio, and application pages
📘 Description
Six pages under src/app/app/freelancer/ mix data-fetching, business logic, and large inline JSX:
freelancer/applications/page.tsx — ~90-line hand-built application card list with inline date formatting; an ApplicationCard component already exists and is used elsewhere but not reused here.
freelancer/portfolio/page.tsx — a full drag-and-drop reorder implementation (drag handlers + an array-rebuild reduce), move-up/down, and toggle-public logic, all inline.
freelancer/services/page.tsx — a full inline ServiceCard component (~85 lines) plus delete-modal state and toast logic.
freelancer/services/new/page.tsx — inline validateForm(), a local FormField component, and a category as any cast.
freelancer/services/[id]/page.tsx — inline OrderCard (~100 lines) and ServiceActions (~65 lines) components, orders typed any[], hardcoded fake stats.
freelancer/services/[id]/edit/page.tsx — duplicates validateForm() and FormField verbatim from services/new/page.tsx.
✅ Acceptance Criteria
🔧 Context AI
📋 Additional Notes
Part of the frontend architecture cleanup milestone, not a Tranche 2 paid deliverable.
🔧 Title:
refactor(freelancer): extract inline logic/components from service, portfolio, and application pages
📘 Description
Six pages under
src/app/app/freelancer/mix data-fetching, business logic, and large inline JSX:freelancer/applications/page.tsx— ~90-line hand-built application card list with inline date formatting; anApplicationCardcomponent already exists and is used elsewhere but not reused here.freelancer/portfolio/page.tsx— a full drag-and-drop reorder implementation (drag handlers + an array-rebuildreduce), move-up/down, and toggle-public logic, all inline.freelancer/services/page.tsx— a full inlineServiceCardcomponent (~85 lines) plus delete-modal state and toast logic.freelancer/services/new/page.tsx— inlinevalidateForm(), a localFormFieldcomponent, and acategory as anycast.freelancer/services/[id]/page.tsx— inlineOrderCard(~100 lines) andServiceActions(~65 lines) components,orderstypedany[], hardcoded fake stats.freelancer/services/[id]/edit/page.tsx— duplicatesvalidateForm()andFormFieldverbatim fromservices/new/page.tsx.✅ Acceptance Criteria
freelancer/applications/page.tsxreuses the existingApplicationCardcomponent instead of a hand-built listusePortfolioReorderhook created, owning the drag-and-drop state/handlers currently inline infreelancer/portfolio/page.tsxServiceCard,OrderCard, andServiceActionsextracted into their own component files undersrc/components/services/new/page.tsxandservices/[id]/edit/page.tsxshare onevalidateForm()and oneFormField(or reuse the client-side pattern of externalizing validation to a*.data.tsfile, matching@/data/client-offer.data) instead of duplicating bothanyremains in this set (orders: any[],category as anyx2) — replace with real types fromsrc/types/npx tsc --noEmit,npx eslint,npx vitest run, andnpm run buildall stay clean🔧 Context AI
src/app/app/freelancer/portfolio/[id]/edit/page.tsx(thin orchestrator, form fully delegated toPortfolioForm)📋 Additional Notes
Part of the frontend architecture cleanup milestone, not a Tranche 2 paid deliverable.