-
Notifications
You must be signed in to change notification settings - Fork 189
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
Reorganize GithubInfo componment #2806
Conversation
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.
Rename src/web/src/components/Posts/GitHubInfo/GitHubInfo.tsx
to src/web/src/components/Posts/GitHubInfo/index.tsx
import PostDesktopInfo from './PostInfo'; | ||
import PostAvatar from './PostAvatar'; | ||
import GithubInfoProvider from '../../GithubInfoProvider'; | ||
import { Post } from '../../../interfaces'; |
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: Organize imports to components first and interfaces after?
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.
I reorganize the imports. I put all of the GitHub componments
together and put the interfaces
at the bottom of the list.
c815eb1
to
dad0bf9
Compare
dad0bf9
to
1d3161b
Compare
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.
src/web/src/components/Posts/GitHubInfo/Index.tsx
is wrong, it should be src/web/src/components/Posts/GitHubInfo/index.tsx
, lower case, and then you can import the folder name without any file within it.
1d3161b
to
d2f3fc7
Compare
d2f3fc7
to
8e323a0
Compare
@@ -1,7 +1,7 @@ | |||
import { ReactElement } from 'react'; | |||
import { Container, createStyles } from '@material-ui/core'; | |||
import { makeStyles, Theme } from '@material-ui/core/styles'; | |||
import PostComponent from './Post'; | |||
import PostComponent from './GitHubInfo/Post'; |
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.
Why do you want to move Post into GitHubInfo?
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.
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.
ok. I move the file back
For some reason git did not notice the uppercase change for the file |
@JiaHua-Zou the index file is not a component so don't capitalize the name and use the |
8e323a0
to
6b28d07
Compare
6b28d07
to
2a35f58
Compare
Had to push the branch again due to having the wrong import path. |
2a35f58
to
271652f
Compare
Rename GithubInfo and organize imports change filename to lowercase Move Post file back
271652f
to
342216f
Compare
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.
LGTM! Nice work
Issue This PR Addresses
#2380
Type of Change
Description
The GitHub components are mixed with other files in the folder
.\src\web\src\components\Posts
and it's starting to look messy. Move all the GitHub components to the folder.\src\web\src\components\Posts\GitHubInfo
to organize it.Steps to test the PR
pnpm install
pnpm services:start
pnpm start
localhost:8000
Checklist