Client avatars, and Robert Pérez on the demo account
`users.image` was null on every seeded customer, and it is the face on every review a pro has — `pro.reviews` selects it as `authorImage` — as well as the chat header. So the one screen meant to prove other people have used this rendered as a column of blank circles. Five customers now carry a portrait, seeded with the source url and rewritten to the bucket like pro_media, and the first of them — the dev-login account the demo signs in as — is Robert Pérez. assets:migrate only knew about pro_media and job photos, so an avatar would have stayed on someone else's CDN indefinitely. It has a users pass now, which also catches the provider avatar a social sign-in writes straight onto the row. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+21
-3
@@ -213,7 +213,22 @@ const PROS: SeedPro[] = [
|
||||
{ name: 'Away Arturo', cat: 'plumber', photo: 'photo-1676210134188-4c05dd172f89', distanceM: 1_100, rating: 4.9, reviews: 20, radius: 15_000, away: true },
|
||||
];
|
||||
|
||||
const CLIENTS = ['Sofía Guzmán', 'Daniel Miranda', 'Emma Rivera', 'Lucas Ponce', 'Alba Tovar'];
|
||||
/**
|
||||
* Customers.
|
||||
*
|
||||
* The avatar is not decoration: `users.image` is the face on every review a pro
|
||||
* has (`pro.reviews` selects it as `authorImage`) and on the chat header. Left
|
||||
* null, every review on every profile in the demo renders faceless, which is
|
||||
* the one screen meant to look like other people have used this.
|
||||
*/
|
||||
const CLIENTS: { name: string; photo: string }[] = [
|
||||
// The first one is the dev-login account — see the phone note below.
|
||||
{ name: 'Robert Pérez', photo: 'photo-1500648767791-00dcc994a43e' },
|
||||
{ name: 'Daniel Miranda', photo: 'photo-1507003211169-0a1dd7228f2d' },
|
||||
{ name: 'Emma Rivera', photo: 'photo-1494790108377-be9c29b29330' },
|
||||
{ name: 'Lucas Ponce', photo: 'photo-1506794778202-cad84cf45f1d' },
|
||||
{ name: 'Alba Tovar', photo: 'photo-1438761681033-6461ffad8d80' },
|
||||
];
|
||||
|
||||
/**
|
||||
* Finished work, per trade, for the review histories below.
|
||||
@@ -370,8 +385,11 @@ async function main() {
|
||||
const clientRows = await db
|
||||
.insert(schema.users)
|
||||
.values(
|
||||
CLIENTS.map((name, i) => ({
|
||||
name,
|
||||
CLIENTS.map((c, i) => ({
|
||||
name: c.name,
|
||||
// Seeded with the source url and rewritten to our bucket by
|
||||
// `pnpm assets:migrate`, exactly as pro_media is.
|
||||
image: `https://images.unsplash.com/${c.photo}?w=200&h=200&fit=crop`,
|
||||
email: `client${i + 1}@linkder.test`,
|
||||
/**
|
||||
* The first client gets the dev-login number (see web/src/server/dev-login.ts).
|
||||
|
||||
Reference in New Issue
Block a user