# Conflicts:
#	components/forms/UserPasswordForm.js
#	components/pages/Dashboard.js
This commit is contained in:
Mike Cao 2022-12-28 15:49:28 -08:00
commit db6a6d6055
7 changed files with 59 additions and 14 deletions

View file

@ -1,9 +1,9 @@
import { useState } from 'react';
import { Button, Loading } from 'react-basics';
import { defineMessages, useIntl } from 'react-intl';
import Page from 'components/layout/Page';
import PageHeader from 'components/layout/PageHeader';
import WebsiteList from 'components/pages/WebsiteList';
import { Button, Loading } from 'react-basics';
import WebsiteChartList from 'components/pages/WebsiteChartList';
import DashboardSettingsButton from 'components/settings/DashboardSettingsButton';
import useApi from 'hooks/useApi';
import useDashboard from 'store/dashboard';
@ -42,7 +42,7 @@ export default function Dashboard({ userId }) {
{!editing && <DashboardSettingsButton />}
</PageHeader>
{editing && <DashboardEdit websites={data} />}
{!editing && <WebsiteList websites={data} showCharts={showCharts} limit={max} />}
{!editing && <WebsiteChartList websites={data} showCharts={showCharts} limit={max} />}
{max < data.length && (
<Button className={styles.button} onClick={handleMore}>
{formatMessage(messages.more)}