Nearby pubs
++ {locationError} +
+ )} + + {!locationError && !hasLocation && ( ++ {locating + ? 'Finding your location…' + : 'Allow location access to see pubs near you.'} +
+ )} + + {hasLocation && isError && ( ++ Nearby pubs are unavailable right now. +
+ )} + + {hasLocation && !isError && isLoading && venues.length === 0 && ( ++ Loading nearby pubs… +
+ )} + + {hasLocation && + !isError && + !isLoading && + venues.length === 0 && + !locationError && ( ++ No pubs within 10 km of your location. +
+ )} + + {hasLocation && venues.length > 0 && ( +TanStack Query
-Database
-Loading todos...
- )} - - {isError && ( -- Failed to load todos: {error.message}. Is the GraphQL backend - running on http://localhost:3001? -
- )} - - {!isPending && !isError && ( -- The frontend queries the GraphQL backend on port 3001, which uses - Prisma to talk to PostgreSQL -
-Setup Instructions:
-DATABASE_URL in{' '}
- packages/db/.env and apps/backend/.env
- pnpm install
- pnpm db:generate && pnpm db:push
- pnpm db:seed
- pnpm dev (starts frontend and backend
- together)
-