-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: products crud ui #161
Conversation
joelhooks
commented
Apr 25, 2024
•
edited
Loading
edited
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
still need to actually do the round trip update to stripe product and price
}) | ||
|
||
return ( | ||
<EditProductFormDesktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Product
is fairly similar to a ContentResource
but is it's own database table so here I'm just copying it to get this running and will probably be able to merge the two in the near future
export function CreateProductCard({ | ||
onCreate, | ||
createProduct, | ||
}: { | ||
onCreate: (product: Product) => Promise<void> | ||
createProduct: (values: NewProduct) => Promise<Product | null> | ||
}) { | ||
return ( | ||
<Card> | ||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"></CardHeader> | ||
<CardContent> | ||
<CreateProductForm onCreate={onCreate} createProduct={createProduct} /> | ||
</CardContent> | ||
</Card> | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the general resource CRUD forms absolutely should handle these but duplication made it simpler for now
import { EventDetails } from '@/pricing/event-details' | ||
import { EventPricingWidget } from '@/pricing/event-pricing-widget' | ||
import { PriceCheckProvider } from '@/pricing/pricing-check-context' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
migrated all the components/methods out of here and into an upper level module