frankcollins3 / Next-Water-App

Happy, Healthy Water Cycling App that tracks user/human fluid intake.
https://next-water-app.vercel.app
1 stars 0 forks source link

organization of pages && CSS/sass [5:00am] #13

Closed frankcollins3 closed 11 months ago

frankcollins3 commented 1 year ago

attempting to do: deploy. Nothing else.

not so much error but consideration of structure, for components / CSS in old next version 13.0.3: for page structure: main-root/ pages/ main.tsx localhost:3000/main

Screen Shot 2023-07-08 at 4 59 28 AM

13.4.9 main-root/ app/ main/ page.tsx localhost:3000/main


bookmarking my team project class mates component/styling structure. (but for react-express)

main-root/ client/ src/ components/ Main/ Main.tsx/ main.css/ index.js

the index.js file imports the Main.tsx which makes for import path to become: import main from '../components/Main

// all that has to be done then is to import the directory because it auto-infers index.js to be the source of truth

13.0.3: for page structure: main-root/ pages/ main.tsx localhost:3000/main

in the main root there is a styles folder with sass and styled components files that correspond to page It's not disorganized but I definitely prefer her react-express syntax of index.js importing the component to export

with Next's "file navigation" pages/file.tsx The file name comes from the .tsx file directly.

can we use a directory like so? pages/ mkdir main/ main.tsx index.js main.css | main.scss

[5:08am]

frankcollins3 commented 11 months ago

CSS needs to be global while sass can be within a component directory