Skip to content

Commit

Permalink
chore: add todo inline
Browse files Browse the repository at this point in the history
  • Loading branch information
gparlakov committed Sep 15, 2024
1 parent e5b5ea7 commit e1f87e3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/admin/campaigns/grid/UploadedCampaignFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ export default function UploadedCampaignFile({ file, campaignId }: Props) {
mutation.mutate()
}

const blob = new Blob(['<a id="a"><b id="b">hey!</b></a>'], {type : 'text/html'});
const newurl = window.URL.createObjectURL(blob);

// in a preview file handler function we would (much like the downloadFileHandler function above)
// downloadCampaignFile(file.id, session)
// .then((response) => {
// const url = window.URL.createObjectURL(new Blob([response.data], type: {file.mimetype}))
const blob = new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: 'text/html' })
const newurl = window.URL.createObjectURL(blob)

return (
<>
<ListItem key={file.id}>
<ListItemAvatar>
<Avatar>
Expand All @@ -77,8 +79,7 @@ export default function UploadedCampaignFile({ file, campaignId }: Props) {
<IconButton edge="end" aria-label="delete" onClick={deleteFileHandler}>
<Delete />
</IconButton>
<iframe id={file.id} src={newurl} />
</ListItem>
<iframe id={file.id} src={newurl} />
</>
)
}

0 comments on commit e1f87e3

Please sign in to comment.