silverwolf-x's picture
download
raw
1.44 kB
import { Button } from 'components'
import deleteFromDb from 'db'
export function Item1(product, foo, bar) {
const a = async function deleteItem1() {
'use server'
await deleteFromDb(
product.id,
product?.foo,
product.bar.baz,
product[
// @ts-expect-error: deliberate useless comma
(foo, bar)
]
)
}
return <Button action={a}>Delete</Button>
}
export function Item2(product, foo, bar) {
async function deleteItem2() {
'use server'
await deleteFromDb(
product.id,
product?.foo,
product.bar.baz,
product[
// @ts-expect-error: deliberate useless comma
(foo, bar)
]
)
}
return <Button action={deleteItem2}>Delete</Button>
}
export function Item3(product, foo, bar) {
const deleteItem3 = async function () {
'use server'
await deleteFromDb(
product.id,
product?.foo,
product.bar.baz,
product[
// @ts-expect-error: deliberate useless comma
(foo, bar)
]
)
}
return <Button action={deleteItem3}>Delete</Button>
}
export function Item4(product, foo, bar) {
const deleteItem4 = async () => {
'use server'
await deleteFromDb(
product.id,
product?.foo,
product.bar.baz,
product[
// @ts-expect-error: deliberate useless comma
(foo, bar)
]
)
}
return <Button action={deleteItem4}>Delete</Button>
}

Xet Storage Details

Size:
1.44 kB
·
Xet hash:
9e5b985303e1b1de31091632b6c1337cd3c66c8b827f1fc9e18ac21d663eef59

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.