Skip to content

Commit

Permalink
fix: fix loading of archived campaigns
Browse files Browse the repository at this point in the history
  • Loading branch information
ajohn25 committed Dec 2, 2024
1 parent 07abb4b commit e03488d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/containers/AdminCampaignStats/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class AdminCampaignStats extends React.Component {
<div className={css(styles.rightAlign)}>
<div className={css(styles.inline)}>
<div className={css(styles.inline)}>
{!campaign.isArchived ? (
{
// edit
<Button
{...dataTest("editCampaign")}
Expand All @@ -323,7 +323,7 @@ class AdminCampaignStats extends React.Component {
>
Edit
</Button>
) : null}
}
<ScriptPreviewButton campaignId={campaignId} />

{isAdmin
Expand Down
10 changes: 5 additions & 5 deletions src/containers/CampaignList/components/CampaignListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ const useStyles = makeStyles({
alignItems: "center"
},
chip: { margin: "4px" },
past: {
opacity: 0.6
},
secondaryText: {
whiteSpace: "pre-wrap"
}
Expand Down Expand Up @@ -55,10 +52,12 @@ export const CampaignListRow: React.FC<Props> = (props) => {
externalSystem
} = campaign;

let listItemStyle = {};
let listItemStyle: React.CSSProperties = {};
let leftIcon;
if (isArchived) {
listItemStyle = styles.past;
listItemStyle = {
opacity: 0.6
};
} else if (!isStarted || hasUnassignedContacts) {
listItemStyle = {
color: theme.palette.warning.dark
Expand Down Expand Up @@ -148,6 +147,7 @@ export const CampaignListRow: React.FC<Props> = (props) => {
const campaignUrl = `/admin/${organizationId}/campaigns/${campaign.id}${
isStarted ? "" : "/edit"
}`;

return (
<ListItem
{...dataTest("campaignRow", false)}
Expand Down

0 comments on commit e03488d

Please sign in to comment.