mirror of
https://github.com/umami-software/umami.git
synced 2026-02-24 06:25:43 +01:00
Updates to team components.
This commit is contained in:
parent
102f5b78b1
commit
dbb3801e66
28 changed files with 173 additions and 159 deletions
|
|
@ -4,7 +4,7 @@ import { FormRow } from 'react-basics';
|
|||
import { parseDateRange } from 'lib/date';
|
||||
import DateFilter from 'components/input/DateFilter';
|
||||
import WebsiteSelect from 'components/input/WebsiteSelect';
|
||||
import { useMessages, useTeamContext } from 'components/hooks';
|
||||
import { useMessages, useTeamUrl } from 'components/hooks';
|
||||
import { ReportContext } from './Report';
|
||||
|
||||
export interface BaseParametersProps {
|
||||
|
|
@ -22,7 +22,7 @@ export function BaseParameters({
|
|||
}: BaseParametersProps) {
|
||||
const { report, updateReport } = useContext(ReportContext);
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { teamId } = useTeamContext();
|
||||
const { teamId } = useTeamUrl();
|
||||
|
||||
const { parameters } = report || {};
|
||||
const { websiteId, dateRange } = parameters || {};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use client';
|
||||
import { useContext } from 'react';
|
||||
import { Icon, LoadingButton, InlineEditField, useToasts } from 'react-basics';
|
||||
import { useMessages, useApi, useNavigation, useTeamContext } from 'components/hooks';
|
||||
import { useMessages, useApi, useNavigation, useTeamUrl } from 'components/hooks';
|
||||
import { ReportContext } from './Report';
|
||||
import styles from './ReportHeader.module.css';
|
||||
import { REPORT_TYPES } from 'lib/constants';
|
||||
|
|
@ -11,7 +11,7 @@ export function ReportHeader({ icon }) {
|
|||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { showToast } = useToasts();
|
||||
const { router } = useNavigation();
|
||||
const { renderTeamUrl } = useTeamContext();
|
||||
const { renderTeamUrl } = useTeamUrl();
|
||||
|
||||
const { post, useMutation } = useApi();
|
||||
const { mutate: create, isPending: isCreating } = useMutation({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue