Initial commit from Create Next App
This commit is contained in:
18
components/ListItem.tsx
Normal file
18
components/ListItem.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React from 'react'
|
||||
import Link from 'next/link'
|
||||
|
||||
import { User } from '../interfaces'
|
||||
|
||||
type Props = {
|
||||
data: User
|
||||
}
|
||||
|
||||
const ListItem = ({ data }: Props) => (
|
||||
<Link href="/users/[id]" as={`/users/${data.id}`}>
|
||||
<a>
|
||||
{data.id}: {data.name}
|
||||
</a>
|
||||
</Link>
|
||||
)
|
||||
|
||||
export default ListItem
|
Reference in New Issue
Block a user