Giter Site home page Giter Site logo

next-amazona's People

Contributors

basir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

next-amazona's Issues

TypeError: Cannot read properties of undefined (reading 'split')

How to fix this probleam
.next\static\chunks\pages\index.js (220:268) @ Object.

218 | * ignore
219 | */

220 | e.noop=function(){},e.errorToPOJO=function(t){if(!(t instanceof Error))throw new Error("error must be instanceof Error.");var e,r={},o=n(Object.getOwnPropertyNames(t));try{for(o.s();!(e=o.n()).done;){var i=e.value;r[i]=t[i]}}catch(t){o.e(t)}finally{o.f()}return r},e.nodeMajorVersion=parseInt(t.versions.node.split(".")[0],10)}).call(this,r(10))},function(t,e,r){"use strict";(function(t){
| ^
221 | /*!
222 | * The buffer module from node.js, for the browser.

Server Side Route Protection

We get a glimpse of the UI with client side route protection, but with validation in server side and checking if the user is authenticated it will only render page which unauthenticated people will see if they are not authenticated, getServerSideProps can block all the operations till the render is complete, therefore this will not have any flashes of authenticated UI,

use case:
prime benifits:
with only client side route protection the pre-rendering will give a glimpse of the prime UI
with server side authentication it is guaranteed to show the un authenticated UI

Unexpected token o in JSON at position 1

I'm having the SyntaxError: Unexpected token o in JSON at position 1 when saving the userInfo to Cookie.
The Cookie value is [object%Object]

Screenshot 2021-09-01 at 12 34 43

What am i doing wrong?

Server error

Server Error
Error: Error serializing .topRatedProducts[0].user returned from getServerSideProps in "/".
Reason: object ("[object Object]") cannot be serialized as JSON. Please only return JSON serializable data types.

The Router section is not working as the mentioned in the course, the working on this way.

`import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
//import { Link } from 'react-router-dom';
import HomeScreen from './Screens/HomeScreen';
import ProductScreen from './Screens/ProductScreen';

function App() {
return (



amazona




<Route path="/" element={} />
<Route path="/ProductScreen/:sulg" element={} />




);
}

export default App;
`
this is an updated Router function that is working with the old coDE IS NOT working.

Dropdown select appends value

I'm having another issue.
When i increase the item quantity in the cart page, for the first product, it adds a "0" in front of the value (for instance, when i select quantity of "5", it adds "05") then when increase it on the second product, it appends the quantity value instead of increasing it.
Here's a screenshot with the code and UI.
*pls note that im not using material UI theme. I'm using simple HTML select

The subtotal result is right though (this the sum for 9 products) but it shows 054items! (the 05 from the first product and the 4 from the second)

Screenshot 2021-09-04 at 12 22 51

BackdropClick Error

Currently when a user opens the login menu and clicks anywhere outside the menu they are redirected to '..../backdropClick' which does not exist.

image

This is happening in the demo site as well

Find not define

product [slug].js I keep getting find no defined when I tried this out, could it be that I'm using an updated next version...

Mongodb server reconnect issue

Hi, I got stuck in that and connect again and again in every 5 second. (service mongod start)

How I can fix that? Please help!

Screenshot from 2021-12-07 00-03-33

TypeError: Cannot read property 'toString' of undefined on function convertDocToObj(doc)

hello mr.bassir please helpme to finish your course without any error, before i followed your part 14 tutorial my code run well connect and can read data.js with mongoDB but when i followed your code on part 14 im stuck getting error
here the output

image

`import mongoose from "mongoose";

const connection = {};

async function connect() {
if (connection.isConnected) {
console.log("already connected");
return;
}
if (mongoose.connections.length > 0) {
connection.isConnected = mongoose.connections[0].readyState;
if (connection.isConnected === 1) {
console.log("use previous connection");
return;
}
await mongoose.disconnect();
}
//delete useCreateIndex, useNewUrlParser, useUnifiedTopology because mongoose 6.00 not used anymore
const db = await mongoose.connect(process.env.MONGODB_URI, {});
console.log("new connection");
connection.isConnected = db.connections[0].readyState;
}

async function disconnect() {
if (connection.isConnected) {
if (process.env.NODE_ENV === "production") {
await mongoose.disconnect();
connection.isConnected = false;
} else {
console.log("not disconnected");
}
}
}

function convertDocToObj(doc) {
doc._id = doc._id.toString();
doc.createdAt = doc.createdAt.toString();
doc.updatedAt = doc.updatedAt.toString();
return doc;
}

const db = { connect, disconnect, convertDocToObj };
export default db;`

request failed with status code 500

request failed with status code 500

how to correct it when during SignIn on account backend run i seed the products and user everything properly but then after this problem occurs

Styled component error

I got this error when using styled component and the css styles of the navbar has been broken:

next-dev.js?3515:32 Warning: Prop className did not match. Server: "MuiTypography-root MuiTypography-body1 makeStyles-brand-98 css-ahj2mt-MuiTypography-root" Client: "MuiTypography-root MuiTypography-body1 makeStyles-brand-2 css-ahj2mt-MuiTypography-root"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.