mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
New components, convert hooks to components, bug fixes.
This commit is contained in:
parent
a2db27894f
commit
9d8a2406e1
21 changed files with 330 additions and 181 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { get } from 'lib/web';
|
||||
import Link from './Link';
|
||||
import WebsiteChart from './WebsiteChart';
|
||||
import Icon from './Icon';
|
||||
import { get } from 'lib/web';
|
||||
import Arrow from 'assets/arrow-right.svg';
|
||||
import styles from './WebsiteList.module.css';
|
||||
|
||||
export default function WebsiteList() {
|
||||
|
|
@ -16,18 +18,23 @@ export default function WebsiteList() {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<>
|
||||
{data &&
|
||||
data.websites.map(({ website_id, label }) => (
|
||||
<div key={website_id}>
|
||||
<h2>
|
||||
<Link href={`/website/${website_id}/${label}`}>
|
||||
<a>{label}</a>
|
||||
<div key={website_id} className={styles.website}>
|
||||
<div className={styles.header}>
|
||||
<h2>
|
||||
<Link href={`/website/${website_id}/${label}`} className={styles.title}>
|
||||
{label}
|
||||
</Link>
|
||||
</h2>
|
||||
<Link href={`/website/${website_id}/${label}`} className={styles.details}>
|
||||
<Icon icon={<Arrow />} /> View details
|
||||
</Link>
|
||||
</h2>
|
||||
</div>
|
||||
<WebsiteChart key={website_id} title={label} websiteId={website_id} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue