-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: add sewing project on main page #8 #9
base: main
Are you sure you want to change the base?
Conversation
valeriafurin
commented
Aug 26, 2024
- Adding Container Component that centeres the page (like a main layout component)
- Adding biome and replacing eslint
- Adding ability to create "Sewing Projects" folder
src/components/CenteredLayout.tsx
Outdated
@@ -0,0 +1,21 @@ | |||
// biome-ignore lint/style/useImportType: <explanation> |
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.
Warum der ignore
hier? Den Lint sollte Biome dir eigtl. automatisch fixen können.
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.
Noch ein Überbleibsel bevor ich biome im Projekt installiert hatte. Ist jetzt. raus :)
src/components/CenteredLayout.tsx
Outdated
@@ -0,0 +1,21 @@ | |||
// biome-ignore lint/style/useImportType: <explanation> | |||
import React from 'react'; |
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.
IIRC brauchst du den Import gar nicht, wenn du React.
nur für Typing verwendest.
src/components/CenteredLayout.tsx
Outdated
align-items: center; | ||
height: 100vh; | ||
width: 100vw; | ||
box-sizing: border-box; |
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.
Das ist besser in einem global Stylesheet hinterlegt:
* { box-sizing: border-box; }
package.json
Outdated
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"eslint": "^9.9.0", |
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.
Die eslint-*
deps brauchst du nicht mehr, oder?
src/components/CenteredLayout.tsx
Outdated
padding: 20px; | ||
`; | ||
|
||
export const CenteredLayout: React.FC<CenteredLayoutProps> = ({ children }) => { |
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.
Du brauchst die Komponente hier nicht explizit zu typen:
export function CenteredLayout({ children }: Props) {
return <StyledContainer>{children}</StyledContainer>;
}
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.
Kannst du mir erklären was genau der Unterschied ist?
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.
Das hier brauchst du nicht:React.FC<CenteredLayoutProps>
, das inferred Typescript dir.
…explicit typing in CenteredLayout