mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
Updated search queries.
This commit is contained in:
parent
80a58cbdd1
commit
e971f2533d
12 changed files with 90 additions and 147 deletions
|
|
@ -12,14 +12,14 @@ import useDashboard from 'store/dashboard';
|
|||
|
||||
export function Dashboard() {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { teamId } = useTeamContext();
|
||||
const { teamId, renderTeamUrl } = useTeamContext();
|
||||
const { showCharts, editing } = useDashboard();
|
||||
const { dir } = useLocale();
|
||||
const pageSize = 10;
|
||||
|
||||
const { result, query, params, setParams } = useWebsites({}, { pageSize });
|
||||
const { result, query, params, setParams } = useWebsites({ teamId }, { pageSize });
|
||||
const { page } = params;
|
||||
const hasData = !!result?.data;
|
||||
const hasData = !!result?.data?.length;
|
||||
|
||||
const handlePageChange = (page: number) => {
|
||||
setParams({ ...params, page });
|
||||
|
|
@ -36,7 +36,7 @@ export function Dashboard() {
|
|||
</PageHeader>
|
||||
{!hasData && (
|
||||
<EmptyPlaceholder message={formatMessage(messages.noWebsitesConfigured)}>
|
||||
<Link href="/settings/websites">
|
||||
<Link href={renderTeamUrl('/settings/websites')}>
|
||||
<Button>
|
||||
<Icon rotate={dir === 'rtl' ? 180 : 0}>
|
||||
<Icons.ArrowRight />
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default function Websites({ teamId }: { teamId: string }) {
|
|||
|
||||
return (
|
||||
<>
|
||||
<WebsitesHeader showActions={user.role !== 'view-only'} />
|
||||
<WebsitesHeader teamId={teamId} showActions={user.role !== 'view-only'} />
|
||||
<WebsitesDataTable teamId={teamId} userId={user.id} allowEdit={true} />
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { Metadata } from 'next';
|
|||
export default function WebsitesPage({ params: { teamId, userId } }) {
|
||||
return (
|
||||
<>
|
||||
<WebsitesHeader showActions={false} />
|
||||
<WebsitesHeader teamId={teamId} showActions={false} />
|
||||
<WebsitesBrowse teamId={teamId} userId={userId} />
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue