forked from VinokurovVE/tests
Layout, Pages, Dashboard, MUI
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
import Card from '../components/Card'
|
||||
import useDataFetching from '../components/FetchingData'
|
||||
interface ICard{
|
||||
interface ICard {
|
||||
firstname: string
|
||||
lastname: string
|
||||
email: string
|
||||
}
|
||||
|
||||
function Users() {
|
||||
const cards= useDataFetching<ICard[]>("http://localhost:8000/auth/user/",[])
|
||||
const cards = useDataFetching<ICard[]>(`${import.meta.env.VITE_API_URL}/auth/user/`, [])
|
||||
return (
|
||||
<div>
|
||||
{cards.map((card, index) => <Card key={index} {...card}/>)}
|
||||
{cards.map((card, index) => <Card key={index} {...card} />)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user