mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
Update show edit button logic for websites table.
This commit is contained in:
parent
926effb0e3
commit
d818bf5aaf
@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
import { ReactNode } from 'react';
|
||||
import { Text, Icon, Icons, GridTable, GridColumn, useBreakpoint } from 'react-basics';
|
||||
import { useMessages, useLogin, useTeamUrl } from 'components/hooks';
|
||||
import { useMessages, useTeamUrl } from 'components/hooks';
|
||||
import LinkButton from 'components/common/LinkButton';
|
||||
|
||||
export interface WebsitesTableProps {
|
||||
@ -18,11 +18,9 @@ export function WebsitesTable({
|
||||
showActions,
|
||||
allowEdit,
|
||||
allowView,
|
||||
teamId,
|
||||
children,
|
||||
}: WebsitesTableProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { user } = useLogin();
|
||||
const breakpoint = useBreakpoint();
|
||||
const { renderTeamUrl } = useTeamUrl();
|
||||
|
||||
@ -37,7 +35,7 @@ export function WebsitesTable({
|
||||
|
||||
return (
|
||||
<>
|
||||
{allowEdit && (teamId || user.isAdmin) && (
|
||||
{allowEdit && (
|
||||
<LinkButton href={renderTeamUrl(`/settings/websites/${websiteId}`)}>
|
||||
<Icon>
|
||||
<Icons.Edit />
|
||||
|
Loading…
Reference in New Issue
Block a user