Skip to content

Instantly share code, notes, and snippets.

@myogeshchavan97
myogeshchavan97 / App.jsx
Created April 2, 2024 11:14
Protected Routes Using createBrowserRouter
import React, { useState } from 'react';
import {
Navigate,
RouterProvider,
createBrowserRouter,
} from 'react-router-dom';
import Cart from './components/Cart';
import Home from './components/Home';
import Login from './components/Login';
import Orders from './components/Orders';
@myogeshchavan97
myogeshchavan97 / styles.css
Created October 26, 2022 17:33
CSS Style
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-size: 20px;
width: 60%;
margin: 10px auto;
}
.errorMsg {
max-width: 350px;
@myogeshchavan97
myogeshchavan97 / topics.js
Created May 7, 2022 06:06
List of topics
const topics = [
{
id: 1,
title: "Basic JavaScript",
slug: "basic-javascript",
subTopics: [
{
id: 1,
title: "JavaScript Operators",
slug: "javascript-operators"
@myogeshchavan97
myogeshchavan97 / products.json
Created February 3, 2022 15:54
Products data
[
{
"name": "Margherita",
"category": "Pizza",
"image": "https://res.cloudinary.com/dyatqxvue/image/upload/v1622453419/margherita_5cdac6ceb6.jpg"
},
{
"name": "Double Cheese Margherita",
"category": "Pizza",
"image": "https://res.cloudinary.com/dyatqxvue/image/upload/v1622453443/double_cheese_margherita_9e5ff8f006.jpg"
@myogeshchavan97
myogeshchavan97 / toppings.json
Created August 6, 2021 17:55
Toppings JSON
[
{
"name": "Capsicum",
"_id": "608c43a5f9b60c077d566e74",
"Toppings": "Capsicum",
"published_at": "2021-04-30T17:51:37.192Z",
"createdAt": "2021-04-30T17:51:33.225Z",
"updatedAt": "2021-05-02T09:16:59.480Z",
"__v": 0,
"price": 1.2,
@myogeshchavan97
myogeshchavan97 / products.json
Created August 6, 2021 17:54
Products JSON
[
{
"is_veg": true,
"quantity": 0,
"_id": "608c3f64ca23f106f7919dc5",
"name": "Margherita",
"description": "Classic delight with 100% real mozzarella cheese",
"rating": 4,
"price": 100,
"published_at": "2021-04-30T17:33:28.204Z",
@myogeshchavan97
myogeshchavan97 / categories.json
Created August 6, 2021 17:52
Categories JSON
[
{
"_id": "608bf734770cc4002db2f0cb",
"cat_title": "Pizza",
"published_at": "2021-04-30T12:25:32.112Z",
"createdAt": "2021-04-30T12:25:24.404Z",
"updatedAt": "2021-05-31T11:31:15.533Z",
"__v": 0,
"has_veg_nonveg_option": true,
"image": {