Skip to content

Commit

Permalink
Merge pull request #847 from BIDMCDigitalPsychiatry/self-help
Browse files Browse the repository at this point in the history
Lamp-core updates
  • Loading branch information
sarithapillai8 authored Jan 7, 2025
2 parents 6b2e34c + 4e846bc commit a11b41d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"jsonata": "^1.8.4",
"jsonexport": "^3.2.0",
"jspdf": "^2.3.1",
"lamp-core": "2022.3.8",
"lamp-core": "^2024.11.18",
"material-icons": "^1.10.11",
"monaco-editor": "^0.33.0",
"notistack": "^2.0.5",
Expand Down
2 changes: 1 addition & 1 deletion src/components/EmbeddedActivity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const demoActivities = {
"Dot Touch": "dottouch",
"lamp.jewels_a": "jewelspro",
"lamp.jewels_b": "jewelspro",
"lamp.fragmented_letters": "fragmentedletters",
"lamp.fragmented_letters": "fragmentationofletters",
"lamp.dbt_diary_card": "dbtdiarycard",
"lamp.balloon_risk": "balloonrisk",
"lamp.pop_the_bubbles": "popthebubbles",
Expand Down
11 changes: 10 additions & 1 deletion src/components/shared/CustomFileWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,16 @@ export default function CustomFileWidget(props) {
<source src={props?.value ?? ""} />
</audio>
) : (
<img src={props?.value ?? ""} height="150" />
props?.value.startsWith("data:image/") && (
<img
src={props?.value ?? ""}
height="150"
onError={(e) => {
const image = e.target as HTMLImageElement
image.style.display = "none" // Hide broken images
}}
/>
)
)}
<IconButton onClick={onClick} className={classes.closeButton}>
<Icon className={classes.closeIcon}>close</Icon>
Expand Down

0 comments on commit a11b41d

Please sign in to comment.