Skip to content

done - #122

Open
goldmonkey777 wants to merge 6 commits into
ironhack-labs:masterfrom
goldmonkey777:master
Open

done#122
goldmonkey777 wants to merge 6 commits into
ironhack-labs:masterfrom
goldmonkey777:master

Conversation

@goldmonkey777

Copy link
Copy Markdown

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements a React application called "StackTracker" that displays technology stacks used by various companies. The PR transforms placeholder components into a fully functional multi-page application with React Router navigation, displaying company profiles, technology details, and interactive navigation between pages.

Changes:

  • Added React Router integration with three main routes: home, company profile, and technology details
  • Implemented company listing page with clickable cards linking to individual company profiles
  • Created company profile pages showing company details and their tech stack with navigation to technology detail pages
  • Built technology detail pages with conditional back navigation based on referrer context

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/main.jsx Wrapped App component with BrowserRouter to enable routing, added semicolons for consistency
src/App.jsx Added routing configuration with three routes, imported JSON data and passed to page components as props
src/components/Navbar.jsx Implemented simple navigation header with link to homepage
src/pages/HomePage.jsx Created company listing page with cards displaying company logos and names, linking to company profiles
src/pages/CompanyPage.jsx Implemented company profile page showing company details, website link, and tech stack with links to technology pages
src/pages/TechnologyPage.jsx Built technology detail page with conditional navigation back to company or home based on query parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/CompanyPage.jsx
Comment on lines +23 to +24
<img src={company.logo} alt={company.companyName} style={{ width: '100px', height: '100px', objectFit: 'contain' }} />
<h2>{company.companyName}</h2>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

The company data uses 'name' property, but the code references 'companyName' which doesn't exist in the JSON structure. This will result in empty alt text and no company name being displayed. Change 'company.companyName' to 'company.name'.

Suggested change
<img src={company.logo} alt={company.companyName} style={{ width: '100px', height: '100px', objectFit: 'contain' }} />
<h2>{company.companyName}</h2>
<img src={company.logo} alt={company.name} style={{ width: '100px', height: '100px', objectFit: 'contain' }} />
<h2>{company.name}</h2>

Copilot uses AI. Check for mistakes.
Comment thread src/App.jsx
Comment on lines +12 to +13
const [companies] = useState(companiesData);
const [technologies] = useState(technologiesData);

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

Using useState for static JSON data is unnecessary. The data from JSON imports is already immutable and doesn't need to be stored in state. Remove useState and use the imported data directly: pass companiesData and technologiesData as props instead of companies and technologies.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +35
<Link to={`/company/${companySlug}`}>
<button style={{ marginTop: '16px' }}>Back to Company</button>
</Link>
) : (
<Link to="/">
<button style={{ marginTop: '16px' }}>Back to Home</button>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

Wrapping a button inside a Link creates nested interactive elements, which can cause accessibility and usability issues. Remove the button wrapper and style the Link directly, or use navigate from useNavigate hook instead.

Suggested change
<Link to={`/company/${companySlug}`}>
<button style={{ marginTop: '16px' }}>Back to Company</button>
</Link>
) : (
<Link to="/">
<button style={{ marginTop: '16px' }}>Back to Home</button>
<Link to={`/company/${companySlug}`} style={{ marginTop: '16px', display: 'inline-block' }}>
Back to Company
</Link>
) : (
<Link to="/" style={{ marginTop: '16px', display: 'inline-block' }}>
Back to Home

Copilot uses AI. Check for mistakes.
Comment thread src/pages/HomePage.jsx
Comment on lines +11 to +14
<div className="company-card" style={{ display: 'flex', alignItems: 'center', gap: '16px', margin: '8px 0', padding: '8px', border: '1px solid #ccc', borderRadius: '8px' }}>
<img src={company.logo} alt={company.companyName} style={{ width: '50px', height: '50px', objectFit: 'contain' }} />
<span>{company.companyName}</span>
</div>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

Extensive inline styles make the code harder to maintain and reuse. Consider moving these styles to CSS classes in a stylesheet, especially for repeated patterns like the card components.

Copilot uses AI. Check for mistakes.
Comment thread src/pages/HomePage.jsx
Comment on lines +12 to +13
<img src={company.logo} alt={company.companyName} style={{ width: '50px', height: '50px', objectFit: 'contain' }} />
<span>{company.companyName}</span>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

The company data uses 'name' property, but the code references 'companyName' which doesn't exist in the JSON structure. This will result in empty alt text and no company name being displayed. Change 'company.companyName' to 'company.name'.

Suggested change
<img src={company.logo} alt={company.companyName} style={{ width: '50px', height: '50px', objectFit: 'contain' }} />
<span>{company.companyName}</span>
<img src={company.logo} alt={company.name} style={{ width: '50px', height: '50px', objectFit: 'contain' }} />
<span>{company.name}</span>

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +35
<Link to={`/company/${companySlug}`}>
<button style={{ marginTop: '16px' }}>Back to Company</button>
</Link>
) : (
<Link to="/">
<button style={{ marginTop: '16px' }}>Back to Home</button>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

Wrapping a button inside a Link creates nested interactive elements, which can cause accessibility and usability issues. Remove the button wrapper and style the Link directly, or use navigate from useNavigate hook instead.

Suggested change
<Link to={`/company/${companySlug}`}>
<button style={{ marginTop: '16px' }}>Back to Company</button>
</Link>
) : (
<Link to="/">
<button style={{ marginTop: '16px' }}>Back to Home</button>
<Link
to={`/company/${companySlug}`}
style={{ marginTop: '16px', display: 'inline-block' }}
>
Back to Company
</Link>
) : (
<Link
to="/"
style={{ marginTop: '16px', display: 'inline-block' }}
>
Back to Home

Copilot uses AI. Check for mistakes.
Comment thread src/pages/CompanyPage.jsx
))}
</div>

<Link to="/"><button style={{ marginTop: '16px' }}>Back to Home</button></Link>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

Wrapping a button inside a Link creates nested interactive elements, which can cause accessibility and usability issues. Remove the button wrapper and style the Link directly, or use navigate from useNavigate hook instead.

Suggested change
<Link to="/"><button style={{ marginTop: '16px' }}>Back to Home</button></Link>
<Link
to="/"
style={{
display: 'inline-block',
marginTop: '16px',
padding: '8px 16px',
borderRadius: '4px',
border: '1px solid #ccc',
backgroundColor: '#f0f0f0',
textDecoration: 'none',
color: 'inherit',
cursor: 'pointer',
}}
>
Back to Home
</Link>

Copilot uses AI. Check for mistakes.
Comment thread src/pages/CompanyPage.jsx
<div className="company-details" style={{ padding: '16px' }}>
<img src={company.logo} alt={company.companyName} style={{ width: '100px', height: '100px', objectFit: 'contain' }} />
<h2>{company.companyName}</h2>
<p>Website: <a href={`https://${company.website}`} target="_blank" rel="noreferrer">{company.website}</a></p>

Copilot AI Feb 26, 2026

Copy link

Choose a reason for hiding this comment

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

The website URL is directly interpolated without validation. If the website field contains a malicious protocol (e.g., 'javascript:alert(1)'), this could lead to XSS. Consider validating that the website starts with 'www.' or using URL validation before constructing the href.

Copilot uses AI. Check for mistakes.
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