Skip to content

Instantly share code, notes, and snippets.

View basir's full-sized avatar

Bassir Jafarzadeh basir

View GitHub Profile
@basir
basir / Scoop.md
Last active November 11, 2017 06:16
  1. Run Powershell
  2. Install scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  1. Install curl, git and openssh
scoop install curl
@basir
basir / style.css
Last active January 21, 2024 09:04
the code for tests
.test { color:green}
$$("div.cues.style-scope.ytd-transcript-body-renderer > div").map(a=>a.innerHTML.trim()).reduce((a, c)=> a + c + '. ')
@basir
basir / Random-Number-Game.html
Created December 6, 2019 13:21
Random-Number-Game
<!DOCTYPE html>
<html>
<head> </head>
<body>
<script>
const max = 5,
min = 1,
prevGuesses = [];
let secretNum = null,

Amazona FAQ

If you can not find you question, put it as comment below. I will answer it and add it to the list.

Home Screen

TypeError: Cannot read property 'map' of undefined HomeScreen

It means that products is null. check the value of products when loading = true, It should be empty array [] Also, check the value of products when loading = false, It should be products array.

Multi-Vendors (Sellers dashboard)

As a seller, I can sell my own products Senario:

  1. Click Become Seller on header menu
  2. Sign-in or Registr as seller
  3. Show seller dashboard including products and orders
  4. Manage products
  5. Manage orders
  6. Seller page as /seller/:sellerId
  7. Manage commissions and payouts

MERN Marketplace

Hello and Welcome to my coding course to build a multi-vendor ecommerce website by MERN stack. In this course you will learn the essential tools and skills to design, develop and deploy a fully-function marketplace website using React and Redux in frontend and Node and MongoDB in backend.

What You Will Learn

This is a practical coding course and we are gonna learn and build lots of stuff in this multi-vendor ecommerce website like:

  • create functional component by react
  • use react hooks to handle form inputs
  • manage application state by redux using custom hooks
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { PayPalButton } from 'react-paypal-button-v2';
import { Link } from 'react-router-dom';
import axios from 'axios';
import { detailsOrder, payOrder, deliverOrder } from '../actions/orderActions';
import MessageBox from '../components/MessageBox';
import LoadingBox from '../components/LoadingBox';
import {
ORDER_PAY_RESET,

Module not found: Error: Can't resolve 'fs'

add this line at the top of the file: import fs from 'fs';

Delete images on heroku after upload

it is because of heroku policy for free dyno. It delete all files after 30 mins idle. if you want to keep them you need to buy a paid dyno. get it from here: https://www.heroku.com/pricing

URL it is /product/undefined

Check why the product link does not contain the product id in HomeScreen.js and Product.js component.