mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Updated clients.
This commit is contained in:
parent
a78d11e352
commit
4dedc57d0a
14 changed files with 66 additions and 47 deletions
|
|
@ -2,11 +2,13 @@ import useApi from 'components/hooks/useApi';
|
|||
import { useState } from 'react';
|
||||
import { Button, Form, FormButtons, GridColumn, Loading, SubmitButton, Toggle } from 'react-basics';
|
||||
import useMessages from 'components/hooks/useMessages';
|
||||
import WebsitesDataTable from '../../websites/WebsitesDataTable';
|
||||
import WebsitesDataTable from 'app/(main)/settings/websites/WebsitesDataTable';
|
||||
import Empty from 'components/common/Empty';
|
||||
import { setValue } from 'store/cache';
|
||||
import { useUser } from 'components/hooks';
|
||||
|
||||
export function TeamWebsiteAddForm({ teamId, onSave, onClose }) {
|
||||
const { user } = useUser();
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { get, post, useQuery, useMutation } = useApi();
|
||||
const { mutate, error } = useMutation(data => post(`/teams/${teamId}/websites`, data));
|
||||
|
|
@ -37,7 +39,7 @@ export function TeamWebsiteAddForm({ teamId, onSave, onClose }) {
|
|||
{!isLoading && !hasData && <Empty />}
|
||||
{hasData && (
|
||||
<Form onSubmit={handleSubmit} error={error}>
|
||||
<WebsitesDataTable showHeader={false} showActions={false}>
|
||||
<WebsitesDataTable userId={user.id} showHeader={false} showActions={false}>
|
||||
<GridColumn name="select" label={formatMessage(labels.selectWebsite)} alignment="end">
|
||||
{row => (
|
||||
<Toggle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue