Skip to content

Conversation

@SirSaltyy
Copy link
Contributor

No description provided.

@SirSaltyy SirSaltyy requested a review from IanPhilips October 2, 2025 19:26
@vercel
Copy link

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
dev Ignored Ignored Preview Oct 9, 2025 5:22am
docs Ignored Ignored Preview Oct 9, 2025 5:22am
prod Ignored Ignored Preview Oct 9, 2025 5:22am

Copy link
Collaborator

@IanPhilips IanPhilips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exciting! It looks pretty good overall, but I've got some changes I'd like made.

With all the hooks, can you make something more generic like usePersistentAPIGetter and then have a custom hook that uses the refresh every 5 mins? And for the ones that are for every user avatar/comment, which will be dozens on many pages, ideally that would use a new usePersistentBatchedGetter like the current useBatchedGetter but with persistent storage.

We don't use vercel handlers anymore, so would like those to be normal api endpoints instead.

Thanks for getting this far!

)
}

const apiKey = process.env.PRINTFUL_KEY
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this new key in common/src/secrets.ts - doesn't look like it's on https://console.cloud.google.com/security/secret-manager?referrer=search&hl=en&project=mantic-markets either

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's stored in Vercel env keys

const targetId = userId ?? auth?.uid
if (!targetId) throw new APIError(400, 'userId is required')
const pg = createSupabaseDirectClient()
const row = await pg.oneOrNone<{ sum: string }>(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why isn't this just a check in the entitlements table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's computing lifetime spend towards the badge, not just current possession.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants