Attempting to pass a prop to the .like filter in a Supabase function. Since .like requires % in the value, I'm unsure how to pass the prop through. See the code snippet below:
const fetchData = async () => {
const { data, error } = await supabase
.from('sneaker')
.select()
.eq('brand', props.model?.brand)
.like('name', '%Yeezy%')
filteredList1.value = data
console.log(data)
}
I would prefer to use props.model?.name instead of '%Yeezy%'. I have attempted to include the prop as indicated but it does not work. Any assistance would be greatly appreciated.