mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Added new react basics provider.
This commit is contained in:
parent
64c6d73b77
commit
6ee27affc4
13 changed files with 59 additions and 66 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { useContext } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Icon, LoadingButton, InlineEditField, useToast } from 'react-basics';
|
||||
import { Icon, LoadingButton, InlineEditField, useToasts } from 'react-basics';
|
||||
import PageHeader from 'components/layout/PageHeader';
|
||||
import { useMessages, useApi } from 'hooks';
|
||||
import { ReportContext } from './Report';
|
||||
|
|
@ -10,7 +10,7 @@ import reportStyles from './reports.module.css';
|
|||
export function ReportHeader({ icon }) {
|
||||
const { report, updateReport } = useContext(ReportContext);
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { toast, showToast } = useToast();
|
||||
const { showToast } = useToasts();
|
||||
const { post, useMutation } = useApi();
|
||||
const router = useRouter();
|
||||
const { mutate: create, isLoading: isCreating } = useMutation(data => post(`/reports`, data));
|
||||
|
|
@ -75,7 +75,6 @@ export function ReportHeader({ icon }) {
|
|||
onCommit={handleDescriptionChange}
|
||||
/>
|
||||
</div>
|
||||
{toast}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue