Skip to content

Conversation

@Cykotech
Copy link
Contributor

What issue is this solving?

No issue created for this PR

Description

Organized components into directories for readability and reusability. The Layout directory contains the Output for React Router, and the Header and Footer components. The new shared directory will contain any components to be shared over multiple routes.

The routes directory had sub directories introduced for each route that will contain components used only in that route.

image

Any helpful knowledge/context for the reviewer?

  • Any new dependencies to install? ❌
  • Any special requirements to test? ❌
  • Any UI changes? Include screenshots if so. ❌

Feelings gif (optional)

What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
alt text

Please make sure you've attempted to meet the following coding standards

  • Code has been tested and does not produce errors
  • Code is readable and formatted
  • There isn't any unnecessary commented-out code

Copy link
Collaborator

@aedwardg aedwardg left a comment

Choose a reason for hiding this comment

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

Overall, looks good. Just a couple of nits around the imports.
If they work as I think they do, would you mind updating them? Thanks!

Comment on lines 1 to 2
import Header from "./Header";
import Footer from "./Footer";
import Header from "./Header.tsx";
import Footer from "./Footer.tsx";
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I believe these don't need the .tsx ending, and I think it's convention to leave it off

Comment on lines 1 to 4
import Hero from "./Hero.tsx";
import Features from "./Features.tsx";
import CTA from "./CTA.tsx";
import Showcase from "./Showcase.tsx";
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here as above

src/main.tsx Outdated
Comment on lines 5 to 7
import Layout from "./components/Layout.tsx";
import Home from "./routes/Home.tsx";
import About from "./routes/About.tsx";
import Layout from "./components/Layout/index.tsx";
import Home from "./routes/Home/index.tsx";
import About from "./routes/About/index.tsx";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Because these components are exported as default, I believe we can change all of these to leave off the
/index.tsx.
E.g.

import Home from "./routes/Home";

@Cykotech
Copy link
Contributor Author

Ah yes. I think it was just some IDE nonsense that put them in.

Copy link
Collaborator

@aedwardg aedwardg left a comment

Choose a reason for hiding this comment

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

🚀

@Cykotech Cykotech merged commit 4e2e7c9 into main Jan 24, 2025
3 checks passed
@Cykotech Cykotech deleted the directory-organization branch January 24, 2025 06:57
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.

3 participants