Skip to content

Mentorship resource images#293

Open
Deejarh wants to merge 2 commits into
Women-Coding-Community:mainfrom
Deejarh:mentorship-resource-images
Open

Mentorship resource images#293
Deejarh wants to merge 2 commits into
Women-Coding-Community:mainfrom
Deejarh:mentorship-resource-images

Conversation

@Deejarh

@Deejarh Deejarh commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Description

This PR restores the mentorship resource page changes from #277, which were reverted in #279 due to broken resource card images, and updates the page to use the backend mentorship resources response shape.

Root Cause

The backend can provide mentorship resource image paths as Google Drive URLs, for example:

https://drive.google.com/uc?id=<file-id>

Those URLs are not reliable as direct <img src=""> values. In the browser, Google Drive may redirect through download/auth flows, or return a response that is not a clean image resource. As a result, the resource cards can show broken images even though the URLs may appear to work when opened directly.

Fix

  • Restores the mentorship resources page to consume the backend response shape.
  • Uses API/fallback data for the hero content, resource titles, descriptions, button labels, PDF links, and footer.
  • Uses stable local frontend image assets for the three resource card images:
    • /mentee_guideMedia.jpg
    • /mentor_pocketbookMedia.jpg
    • /mentor_guideeMedia.jpg
  • Keeps the PDF resource links from the backend data and opens them in a new tab.
  • Supports resource image data in the response as either:
    1. An Image object with path
    2. A string image URL/path

Note: backend image paths are currently not used for the displayed card artwork because Google Drive image URLs are unreliable for direct rendering in resource cards.

Screenshots

Before
Screenshot 2026-06-01 at 21 22 02

After
Screenshot 2026-06-01 at 21 21 11

Type

  • Bug Fix
  • New Feature
  • Code Refactor
  • Documentation
  • Other

Related Issue

Testing

Pull request checklist

Please check if your PR fulfills the following requirements:

  • I checked and followed the contributor guide
  • I have tested my changes locally.
  • I have added a screenshot from the website after I tested it locally

@Deejarh Deejarh requested review from a team and womencodingcommunity as code owners June 27, 2026 16:28
@Deejarh Deejarh marked this pull request as draft June 28, 2026 14:17
@Deejarh Deejarh force-pushed the mentorship-resource-images branch from 5c783eb to ad59a2e Compare June 28, 2026 14:21
@sonarqubecloud

Copy link
Copy Markdown

footer: FooterResponse;
};

const resourceImages = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The images are going to come from the backend, it should not be hardcoded in the frontend, your previous pr was following the correct approach.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I noticed the google drive link still fails to render the image(it's not reliable).
I think loading the image from the frontend is a temporary fix. what do you think @dricazenck ?

@Deejarh Deejarh marked this pull request as ready for review July 6, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants