Skip to content

Commit

Permalink
Temporary fix (OAM triage 2025 01 15)
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Jan 21, 2025
1 parent 7132303 commit ff9fe3b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/components/results_item.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,14 @@ export default createReactClass({
<div className="result-thumbnail">
<img
alt="Result thumbnail"
{/* // TEMPORARY FIX (OAM triage 2025 01 15) */}
src={
d.properties.thumbnail ||
"assets/graphics/layout/img-placeholder.svg"
d.properties.thumbnail
? d.properties.thumbnail.replace(
"oin-hotosm.",
"oin-hotosm-temp."
)
: "assets/graphics/layout/img-placeholder.svg"
}
/>
</div>
Expand Down
9 changes: 7 additions & 2 deletions src/components/results_list_card.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,14 @@ export default class ResultsListCard extends React.Component {
<div className="card-media">
<img
alt="Result thumbnail"
{/* // TEMPORARY FIX (OAM triage 2025 01 15) */}
src={
d.properties.thumbnail ||
"assets/graphics/layout/img-placeholder.svg"
d.properties.thumbnail
? d.properties.thumbnail.replace(
"oin-hotosm.",
"oin-hotosm-temp."
)
: "assets/graphics/layout/img-placeholder.svg"
}
/>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/components/user_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ export default createReactClass({
<li className="account__images-upload" key={image._id}>
<div className="images-thumbnail">
<a onClick={() => utils.imageUri(image)}>
{/* // TEMPORARY FIX (OAM triage 2025 01 15) */}
<img
src={image.properties.thumbnail}
src={image.properties.thumbnail.replace(
"oin-hotosm.",
"oin-hotosm-temp."
)}
width="100"
key={i}
alt="Imagery thumbnail"
Expand Down
1 change: 1 addition & 0 deletions src/stores/user_store.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default Reflux.createStore({
// TEMPORARY FIX (OAM triage 2025 01 15)
for (let i = 0; i < response.results.length; i++) {
for (let j = 0; j < response.results[i].images; j++) {
console.log(response.results[i].images[j].uuid);
response.results[i].images[j].uuid = response.results[i].images[j].uuid.replace("oin-hotosm.", "oin-hotosm-temp.");
response.results[i].images[j].meta_uri = response.results[i].images[j].meta_uri.replace("oin-hotosm.", "oin-hotosm-temp.");
}
Expand Down

0 comments on commit ff9fe3b

Please sign in to comment.