Skip to content

Instantly share code, notes, and snippets.

@Geckodroid
Geckodroid / StateContext.js
Created November 21, 2023 16:18 — forked from adrianhajdin/StateContext.js
Build and Deploy a Modern Full Stack ECommerce Application with Stripe
import React, { createContext, useContext, useState, useEffect } from 'react';
import { toast } from 'react-hot-toast';
const Context = createContext();
export const StateContext = ({ children }) => {
const getLocalStorage = (name) => {
if (typeof window !== 'undefined') {
const storage = localStorage.getItem(name);
@Geckodroid
Geckodroid / Footer.jsx
Created November 21, 2023 20:22 — forked from ShariqAnsari88/Footer.jsx
Online Shoe Store