-
Notifications
You must be signed in to change notification settings - Fork 2
Reorganize files into new directories #48
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
Conversation
aedwardg
left a comment
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.
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!
src/components/Layout/index.tsx
Outdated
| import Header from "./Header"; | ||
| import Footer from "./Footer"; | ||
| import Header from "./Header.tsx"; | ||
| import Footer from "./Footer.tsx"; |
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.
nit: I believe these don't need the .tsx ending, and I think it's convention to leave it off
src/routes/Home/index.tsx
Outdated
| import Hero from "./Hero.tsx"; | ||
| import Features from "./Features.tsx"; | ||
| import CTA from "./CTA.tsx"; | ||
| import Showcase from "./Showcase.tsx"; |
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.
same here as above
src/main.tsx
Outdated
| 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"; |
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.
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";|
Ah yes. I think it was just some IDE nonsense that put them in. |
aedwardg
left a comment
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.
🚀
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.
Any helpful knowledge/context for the reviewer?
Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/

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