Updated empty message for websites.

This commit is contained in:
Mike Cao 2020-10-01 17:32:49 -07:00
parent e60376fd59
commit 77db711a67
3 changed files with 5 additions and 7 deletions

View File

@ -1,16 +1,14 @@
import React from 'react'; import React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import { useRouter } from 'next/router'; import Link from 'components/common/Link';
import WebsiteChart from 'components/metrics/WebsiteChart'; import WebsiteChart from 'components/metrics/WebsiteChart';
import Page from 'components/layout/Page'; import Page from 'components/layout/Page';
import Button from 'components/common/Button';
import EmptyPlaceholder from 'components/common/EmptyPlaceholder'; import EmptyPlaceholder from 'components/common/EmptyPlaceholder';
import useFetch from 'hooks/useFetch'; import useFetch from 'hooks/useFetch';
import Arrow from 'assets/arrow-right.svg'; import Arrow from 'assets/arrow-right.svg';
import styles from './WebsiteList.module.css'; import styles from './WebsiteList.module.css';
export default function WebsiteList({ userId }) { export default function WebsiteList({ userId }) {
const router = useRouter();
const { data } = useFetch('/api/websites', { user_id: userId }); const { data } = useFetch('/api/websites', { user_id: userId });
if (!data) { if (!data) {
@ -33,9 +31,9 @@ export default function WebsiteList({ userId }) {
/> />
} }
> >
<Button icon={<Arrow />} size="medium" onClick={() => router.push('/settings')}> <Link href="/settings" icon={<Arrow />} iconRight>
<FormattedMessage id="message.go-to-settings" defaultMessage="Go to settings" /> <FormattedMessage id="message.go-to-settings" defaultMessage="Go to settings" />
</Button> </Link>
</EmptyPlaceholder> </EmptyPlaceholder>
)} )}
</Page> </Page>

View File

@ -25,7 +25,7 @@ export async function runQuery(query) {
}); });
} }
export async function rawQuery(query, params) { export async function rawQuery(query, params = []) {
const db = getDatabase(); const db = getDatabase();
if (db !== POSTGRESQL && db !== MYSQL) { if (db !== POSTGRESQL && db !== MYSQL) {

View File

@ -1,6 +1,6 @@
{ {
"name": "umami", "name": "umami",
"version": "0.68.0", "version": "0.69.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ", "description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",