Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/LeftNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { useStaticQuery, graphql, Link } from 'gatsby';
import React from 'react';
import './LeftNav.scss';
import book from './images/book.png';
// import book from './images/book.png';

const { v4: uuidv4 } = require('uuid');

Expand Down Expand Up @@ -194,7 +194,7 @@ class ListItem extends React.Component {
}`}
>
<div className='activeIndicator' />
<img src={book} alt='book' />
<img src='https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/Updated_Doc_Images/book.png' alt='book' />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid hard-coded S3 URLs in component markup.

Line 197 hard-codes a specific bucket host, which bypasses your centralized asset configuration pattern (gatsby-config.js Line 1-6 and Line 82-90, plus .env Line 10-12). This creates environment-coupling and higher breakage risk when host/bucket values change.

Suggested direction
-        <img src='https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/Updated_Doc_Images/book.png' alt='book' />
+        <img src={book} alt='book' />
-// import book from './images/book.png';
+import book from './images/book.png';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/LeftNav.jsx` at line 197, The img tag in LeftNav.jsx currently
uses a hard-coded S3 URL which bypasses centralized asset configuration; replace
that literal URL with the configured asset host or bucket value (e.g., read from
the site config or environment variable used in your Gatsby setup such as the
GATSBY_ or process.env asset var) so the src is constructed from the centralized
config, and update the component to import or reference that config (LeftNav.jsx
img src) rather than embedding the S3 host directly.

<Link to={normalizePath(url)}>{data.leftNavTitle || title}</Link>{' '}
</li>
);
Expand Down
Loading