'await' has no effect on the type of this expression.
Unanswered
Drentse Patrijshond posted this in #help-forum
Drentse PatrijshondOP
My Ide gives me this warning eventhought i upgraded to next 15
const SelectPartnerPage = async ({ params }: SelectPartnerPageProps) => {
const { shop_url_id } = await params;
const SelectPartnerPage = async ({ params }: SelectPartnerPageProps) => {
const { shop_url_id } = await params;
9 Replies
American Chinchilla
Could be due to eslint if using that
And im not sure if eslint supports next 15
@American Chinchilla Could be due to eslint if using that
Drentse PatrijshondOP
could be
but im currently in a server component
const PartnersPage = async ({ params, searchParams }: PartnersPageParams) => {
const { shop_url_id } = await params;
const { id, ref, edit: edit_key, addressId } = await searchParams;
is this the correct way to implement the params?
const PartnersPage = async ({ params, searchParams }: PartnersPageParams) => {
const { shop_url_id } = await params;
const { id, ref, edit: edit_key, addressId } = await searchParams;
is this the correct way to implement the params?
@Drentse Patrijshond but im currently in a server component
const PartnersPage = async ({ params, searchParams }: PartnersPageParams) => {
const { shop_url_id } = await params;
const { id, ref, edit: edit_key, addressId } = await searchParams;
is this the correct way to implement the params?
Netherland Dwarf
Yeah, shop_url can be undefined and normally I think its either TypeScript or ESLINT that won't let you desture something like that
Dwarf Hotot
It's because params don't need await you can use params directly without need of await
Southern rough shrimp
Make sure to mark the solution