mirror of
https://github.com/umami-software/umami.git
synced 2026-02-23 14:05:35 +01:00
Changed route ids to be more explicit.
This commit is contained in:
parent
1a70350936
commit
18e36aa7b3
105 changed files with 86 additions and 76 deletions
23
src/app/(main)/settings/teams/[teamId]/TeamData.tsx
Normal file
23
src/app/(main)/settings/teams/[teamId]/TeamData.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { ActionForm, Button, Modal, ModalTrigger } from 'react-basics';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import TeamDeleteForm from '../TeamDeleteForm';
|
||||
|
||||
export function TeamData({ teamId }: { teamId: string }) {
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
|
||||
return (
|
||||
<ActionForm
|
||||
label={formatMessage(labels.deleteTeam)}
|
||||
description={formatMessage(messages.deleteTeamWarning)}
|
||||
>
|
||||
<ModalTrigger>
|
||||
<Button variant="danger">{formatMessage(labels.delete)}</Button>
|
||||
<Modal title={formatMessage(labels.deleteTeam)}>
|
||||
{(close: () => void) => <TeamDeleteForm teamId={teamId} onClose={close} />}
|
||||
</Modal>
|
||||
</ModalTrigger>
|
||||
</ActionForm>
|
||||
);
|
||||
}
|
||||
|
||||
export default TeamData;
|
||||
Loading…
Add table
Add a link
Reference in a new issue