Closed fiatjaf closed 7 years ago
Hi, I recently learned React and would love to contribute to an open source React project. Any tips on how to get started would be appreciated, but I will try to navigate myself through the problem nonetheless.
Hey, @zktnguyen. I don't know exactly what kind of tip you could need, but have you manage to run coisas locally on your computer?
Hi, I tried to run it locally. After npm install
and npm run build
and using Caddy to host on a localhost server, I get these errors: http://puu.sh/xdB1e/60cf622c02.png
and unfortunately, the website does not render properly, showing just the background color with no content.
I don't understand it, I've just git clone
d it to a new directory, run npm install
and npm run build
and everything has worked. Does the build run without errors? Have you built from master
, without changing the code?
Yes, built from master
without changing code. There are no errors during the build, there are errors that occur on the Chrome console, though.
I will attempt again and let you know the results on this comment ASAP.
I figured out the error. You have two files in components
folder that are named Index.js and index.js. Whenever I git clone
the master
branch, I only receive one or the other file. I fixed it by renaming Index.js and anywhere it is "required" (I only found index.js). Now it runs but without style since I think you use the #Index
identifier (by guess) in your CSS.
Oh, that was very unexpected and weird. Windows, right? I'm sorry.
Yeah, I also tried on my Mac to see if it was an environment thing, but it happened on the Mac too. It's ok!
It would be great if you renamed that Index.js
component and whoever requires it to something else, maybe Landing
, IndexComponent
? and submitted those changes in a separate pull request.
Thank you for the suggestions, I will try to get that pull request in soon.
This can also be closed now, right?
Yes.
When you write "closes/fixes/solves
This one was closed by https://github.com/fiatjaf/coisas/pull/10
Nowadays Index is just a component that asks the user to type the name of a repository, so it is taken to
#!/owner/repo/
(all the action happens at the Repo component).We could keep track, on
localStorage
, of repositories visited by the user (in a certain browser, anyway), updating the value every time the user opens a repository, and then show the list of last visited repositories onIndex
.Besides the
owner/repo
slug of the repository, the time of the last access should be stored too, so repositories are shown in order, the most recently viewed first.