Website components. Update chart component.

This commit is contained in:
Mike Cao 2020-07-28 01:17:45 -07:00
parent d81ee3932d
commit bdcdcd9d13
9 changed files with 165 additions and 43 deletions

View file

@ -2,9 +2,10 @@ import React from 'react';
import Link from 'next/link';
import { parse } from 'cookie';
import Layout from 'components/Layout';
import Chart from 'components/Chart';
import PageviewsChart from 'components/PageviewsChart';
import { verifySecureToken } from 'lib/crypto';
import { subDays, endOfDay } from 'date-fns';
import WebsiteList from '../components/WebsiteList';
export default function HomePage({ username }) {
return (
@ -12,8 +13,9 @@ export default function HomePage({ username }) {
<h2>
You've successfully logged in as <b>{username}</b>.
</h2>
<WebsiteList />
<div>
<Chart
<PageviewsChart
websiteId={3}
startDate={subDays(endOfDay(new Date()), 6)}
endDate={endOfDay(new Date())}