Feat/um 140 password modal (#1718)

* Change password to modal.

* Close on save.
This commit is contained in:
Brian Cao 2022-12-28 12:37:09 -08:00 committed by GitHub
parent 7bbed0e12b
commit 74d2cd8d03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 58 additions and 11 deletions

View file

@ -2,7 +2,7 @@ import { useState } from 'react';
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 WebsiteChartList from 'components/pages/WebsiteChartList';
import { Button } from 'react-basics';
import DashboardSettingsButton from 'components/settings/DashboardSettingsButton';
import useFetch from 'hooks/useFetch';
@ -37,7 +37,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)}