How to correctly wrote this code in typescript?
const newValue: string = selectValue;
export default async function main() {
const callUsers = await prisma.user.findMany({
where: {
id: newValue,
}
})
const email = callUsers.map((user: any) => user.email)
return (
<div>
<select value={selectValue} onChange={handleChange}>
<option value='1'>1</option>
<option value='2'>2</option>
</select>
<p>{email}</p>
</div>
)
}
I expect to get value from options
New contributor