This commit is contained in:
Mike Cao 2023-08-25 13:49:36 -07:00
commit 8aaaa8dfd4
7 changed files with 12 additions and 6 deletions

View File

@ -17,7 +17,7 @@ export function ConfirmDeleteForm({ name, onConfirm, onClose }) {
<FormattedMessage {...messages.confirmDelete} values={{ target: <b>{name}</b> }} />
</p>
<FormButtons flex>
<LoadingButton loading={loading} onClick={handleConfirm} variant="danger">
<LoadingButton isLoading={loading} onClick={handleConfirm} variant="danger">
{formatMessage(labels.delete)}
</LoadingButton>
<Button onClick={onClose}>{formatMessage(labels.cancel)}</Button>

View File

@ -16,7 +16,7 @@ export function RefreshButton({ websiteId, isLoading }) {
return (
<TooltipPopup label={formatMessage(labels.refresh)}>
<LoadingButton loading={isLoading} onClick={handleClick}>
<LoadingButton isLoading={isLoading} onClick={handleClick}>
<Icon>
<Icons.Refresh />
</Icon>

View File

@ -66,7 +66,7 @@ export function ReportHeader({ icon }) {
<PageHeader title={<Title />}>
<LoadingButton
variant="primary"
loading={isCreating || isUpdating}
isLoading={isCreating || isUpdating}
disabled={!websiteId || !dateRange?.value || !name}
onClick={handleSave}
>

View File

@ -19,7 +19,11 @@ export function TeamMemberRemoveButton({ teamId, userId, disabled, onSave }) {
};
return (
<LoadingButton onClick={() => handleRemoveTeamMember()} disabled={disabled} loading={isLoading}>
<LoadingButton
onClick={() => handleRemoveTeamMember()}
disabled={disabled}
isLoading={isLoading}
>
<Icon>
<Icons.Close />
</Icon>

View File

@ -33,6 +33,7 @@ export function TeamMembers({ teamId, readOnly }) {
<>
<TeamMembersTable
onSave={handleSave}
teamId={teamId}
data={data}
readOnly={readOnly}
onFilterChange={handleFilterChange}

View File

@ -6,6 +6,7 @@ import SettingsTable from 'components/common/SettingsTable';
export function TeamMembersTable({
data = [],
teamId,
onSave,
readOnly,
filterValue,
@ -50,7 +51,7 @@ export function TeamMembersTable({
return (
!readOnly && (
<TeamMemberRemoveButton
teamId={row.teamId}
teamId={teamId}
userId={row.id}
disabled={user.id === row?.user?.id || row.role === ROLES.teamOwner}
onSave={onSave}

View File

@ -19,7 +19,7 @@ export function TeamWebsiteRemoveButton({ teamId, websiteId, onSave }) {
};
return (
<LoadingButton onClick={() => handleRemoveTeamMember()} loading={isLoading}>
<LoadingButton onClick={() => handleRemoveTeamMember()} isLoading={isLoading}>
<Icon>
<Icons.Close />
</Icon>