|
|
|
@ -1,6 +1,15 @@
|
|
|
|
import { Navbar } from '@/App'
|
|
|
|
import { Navbar } from '@/App'
|
|
|
|
import { ThemeProvider } from '@/components/theme-provider'
|
|
|
|
import { ThemeProvider } from '@/components/theme-provider'
|
|
|
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
|
|
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
Table,
|
|
|
|
|
|
|
|
TableBody,
|
|
|
|
|
|
|
|
TableCaption,
|
|
|
|
|
|
|
|
TableCell,
|
|
|
|
|
|
|
|
TableHead,
|
|
|
|
|
|
|
|
TableHeader,
|
|
|
|
|
|
|
|
TableRow,
|
|
|
|
|
|
|
|
} from '@/components/ui/table'
|
|
|
|
|
|
|
|
|
|
|
|
import { useParams } from 'react-router-dom'
|
|
|
|
import { useParams } from 'react-router-dom'
|
|
|
|
import { useEffect, useState } from 'react'
|
|
|
|
import { useEffect, useState } from 'react'
|
|
|
|
@ -189,21 +198,42 @@ export default function Dashboard() {
|
|
|
|
</CardTitle>
|
|
|
|
</CardTitle>
|
|
|
|
</CardHeader>
|
|
|
|
</CardHeader>
|
|
|
|
<CardContent>
|
|
|
|
<CardContent>
|
|
|
|
{countryVisitor.map((country) => {
|
|
|
|
<Table>
|
|
|
|
return (
|
|
|
|
<TableHeader>
|
|
|
|
<div className='flex w-full items-center justify-between'>
|
|
|
|
<TableRow>
|
|
|
|
<div className='flex w-1/2 items-center justify-between gap-2'>
|
|
|
|
<TableHead className='w-[100px]'></TableHead>
|
|
|
|
<img
|
|
|
|
<TableHead>Country</TableHead>
|
|
|
|
src={`https://flagsapi.com/${country.country_code}/flat/64.png`}
|
|
|
|
<TableHead className='text-right'>
|
|
|
|
/>
|
|
|
|
Visitor(s)
|
|
|
|
<div>{country.country}</div>
|
|
|
|
</TableHead>
|
|
|
|
</div>
|
|
|
|
</TableRow>
|
|
|
|
<div>
|
|
|
|
</TableHeader>
|
|
|
|
{country.visitor_count}
|
|
|
|
<TableBody>
|
|
|
|
</div>
|
|
|
|
{countryVisitor.map((country) => {
|
|
|
|
</div>
|
|
|
|
return (
|
|
|
|
)
|
|
|
|
<TableRow>
|
|
|
|
})}
|
|
|
|
<TableCell>
|
|
|
|
|
|
|
|
<img
|
|
|
|
|
|
|
|
src={`https://flagsapi.com/${country.country_code}/flat/64.png`}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</TableCell>
|
|
|
|
|
|
|
|
<TableCell>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
country.country
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</TableCell>
|
|
|
|
|
|
|
|
<TableCell className='text-right'>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
country.visitor_count
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</TableCell>
|
|
|
|
|
|
|
|
</TableRow>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
</TableBody>
|
|
|
|
|
|
|
|
</Table>
|
|
|
|
</CardContent>
|
|
|
|
</CardContent>
|
|
|
|
</Card>
|
|
|
|
</Card>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|