Skip to content
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

Some updates to the project w/ One crash fix #7

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

flodef
Copy link

@flodef flodef commented Jun 7, 2022

Hi Raza,
Sorry for uploading the whole project completed, I tried to find the best way to thank you and to give some feedback.
Here is my code and the associated changes. Feel free to update the corresponding buildspace course accordingly :

  • .eslintrc.json ==> updated to compile and use linter
  • .vscode/launch.json ==> use vscode debugger directly (with F5)
  • components/Buy.js ==> changed from to as the last version of react-loader-spinner is needed in the project compile, changed both useEffect + getItem(itemID) to factorize and remove lag when displaying "Buy Item" before changing to "Download" (now spin until button is decided), changed components return accordingly
  • components/CreateProduct.js ==> add an uploaded state to display status and file name on the "Upload file" button + update button html accordingly, add test functions (in comment) to not saturate ipfs server while testing, corrected a BUG in displaying the filename (between

    brackets)

  • package.json ==> update spinner to lastest + web3 storage
  • pages/_app.js ==> use a environment variable (.env) to select between DEVNET or MAINNET
  • pages/api/createTransaction.js ==> same as above for the network + USDC token address, updated new Transaction() method to lastest (the one you used is deprecated)
  • pages/api/fetchItem.js ==> CRASH : the code should test for itemID == null instead of !item (0 is set as "Missing ItemID" otherwise)
  • pages/api/fetchProducts.js ==> add return (hash && filename) ? rest : ""; otherwise linter is angry because hash & filename are not used
  • pages/index.js ==> changed renderNotConnectedContainer and renderConnectWalletContainer to always display the Wallet because you want to be able to disconnect once connected + update html
  • styles/App.css ==> buttons should have the same height (avoid blinking when button is changing)
  • styles/CreateProduct.module.css ==> updated input[type="file"] to display "Uploading" when uploading and the file name when uploaded (could be factorised).

Thanks a lot again for this brilliant project. I had a blast learning with your code !! I love what you did. It's nearly perfect and I really enjoyed your sense of humour. I want to do another course with you already <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant