diff --git a/demos/freelance-escrow/README.md b/demos/freelance-escrow/README.md index a2c5998..a497a89 100644 --- a/demos/freelance-escrow/README.md +++ b/demos/freelance-escrow/README.md @@ -17,6 +17,9 @@ simulation. You'll need testnet XLM in your Freighter wallet to post the bond; get some from [Friendbot](https://friendbot.stellar.org/) if you're testing with a fresh address. +The app starts with an empty job list. Every job it shows is one created +through the "Post a job" form, so there is no seeded or mock content anywhere. + ## What maps to what | App action | Tholos call | @@ -82,5 +85,5 @@ src/ components/ JobCard.tsx, MilestoneRow.tsx, PostJobForm.tsx, WalletButton.tsx, RoleSwitcher.tsx data/ - jobs.ts Seed jobs and the Job/Milestone types + jobs.ts Job/Milestone types ``` diff --git a/demos/freelance-escrow/src/App.css b/demos/freelance-escrow/src/App.css index 07d01ca..42de050 100644 --- a/demos/freelance-escrow/src/App.css +++ b/demos/freelance-escrow/src/App.css @@ -130,6 +130,14 @@ gap: var(--space-4); } +.job-list-empty { + margin: 0; + padding: var(--space-5); + border-radius: var(--radius-lg); + border: 1px dashed var(--border); + color: var(--text-muted); +} + .job-card { border-radius: var(--radius-lg); padding: var(--space-5); diff --git a/demos/freelance-escrow/src/App.tsx b/demos/freelance-escrow/src/App.tsx index 503970b..4a93fdf 100644 --- a/demos/freelance-escrow/src/App.tsx +++ b/demos/freelance-escrow/src/App.tsx @@ -34,9 +34,11 @@ function AppShell() { {showPostJob && setShowPostJob(false)} />}
- {jobs.map((job) => ( - - ))} + {jobs.length === 0 ? ( +

No jobs yet. Post the first one to get started.

+ ) : ( + jobs.map((job) => ) + )}
diff --git a/demos/freelance-escrow/src/data/jobs.ts b/demos/freelance-escrow/src/data/jobs.ts index 7818610..4ed4ef0 100644 --- a/demos/freelance-escrow/src/data/jobs.ts +++ b/demos/freelance-escrow/src/data/jobs.ts @@ -39,81 +39,3 @@ export interface Job { token: string; milestones: Milestone[]; } - -export const jobs: Job[] = [ - { - id: "job-1", - title: "Landing page redesign", - description: - "Redesign the marketing site landing page: new hero, pricing table, and mobile layout.", - client: "Nova Analytics", - freelancer: "Priya Chen", - token: "USDC", - milestones: [ - { - id: "job-1-m1", - title: "Wireframes and content outline", - amount: "250", - status: "in_progress", - }, - { - id: "job-1-m2", - title: "Hero and pricing section build", - amount: "600", - status: "in_progress", - }, - { - id: "job-1-m3", - title: "Mobile layout and QA pass", - amount: "400", - status: "in_progress", - }, - ], - }, - { - id: "job-2", - title: "Onboarding email sequence", - description: - "Write and implement a 5-part onboarding email sequence in the existing ESP template.", - client: "Fernbank Studio", - freelancer: "Diego Ramirez", - token: "USDC", - milestones: [ - { - id: "job-2-m1", - title: "Copy draft for all 5 emails", - amount: "300", - status: "in_progress", - }, - { - id: "job-2-m2", - title: "ESP implementation and send test", - amount: "200", - status: "in_progress", - }, - ], - }, - { - id: "job-3", - title: "API rate-limit middleware", - description: - "Add a configurable rate-limit middleware to the existing Node API gateway, with tests.", - client: "Harrow Logistics", - freelancer: "Amara Okafor", - token: "USDC", - milestones: [ - { - id: "job-3-m1", - title: "Middleware implementation", - amount: "500", - status: "in_progress", - }, - { - id: "job-3-m2", - title: "Load test and tuning", - amount: "350", - status: "in_progress", - }, - ], - }, -]; diff --git a/demos/freelance-escrow/src/state/JobsContext.tsx b/demos/freelance-escrow/src/state/JobsContext.tsx index 5605523..ea302f4 100644 --- a/demos/freelance-escrow/src/state/JobsContext.tsx +++ b/demos/freelance-escrow/src/state/JobsContext.tsx @@ -8,7 +8,7 @@ import { type ReactNode, type SetStateAction, } from "react"; -import { jobs as seedJobs, type Job, type Milestone, type MilestoneStatus } from "../data/jobs"; +import type { Job, Milestone, MilestoneStatus } from "../data/jobs"; import { JobsContext, type JobsContextValue, type NewJobInput } from "./jobs-context"; import type { Assertion } from "../lib/tholos"; import { detectWallet } from "../lib/wallet"; @@ -63,13 +63,13 @@ function loadJobsFromStorage(): Job[] { try { const stored = window.localStorage.getItem(JOBS_STORAGE_KEY); if (stored === null) { - return seedJobs; + return []; } const parsed: unknown = JSON.parse(stored); - return Array.isArray(parsed) ? parsed.filter(isJob) : seedJobs; + return Array.isArray(parsed) ? parsed.filter(isJob) : []; } catch { - return seedJobs; + return []; } }