-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat. facility cover image upload #3528
feat. facility cover image upload #3528
Conversation
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
👋 Hi, @rithviknishad, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
@rithviknishad i can see a github-code-scanning comment, can you check it and let me know, the PR is good for testing and its been approved in the EOD meeting |
there is no cover page ratio is been mentioned in the page, if its been mentioned, it would be good for a user to resize the image before uploading it to the platform.
|
|
<div className="flex-1 flex m-8 rounded-lg items-center justify-center"> | ||
{preview || facility.read_cover_image_url ? ( | ||
<img | ||
src={imgSrc} |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rithviknishad try validating the url (imgSrc
), something like
src={ isValidURL(imgSrc) ? imgSrc : defaultURL }
test approved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed!
|
Closes #2171
Closes #2131
Fixes #3527
1. Shows the image on the facilities list page
1.5 Shows the image on the facility home page
2. Edit a facility cover photo
3. Or upload a new cover photo
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist