Skip to content

Instantly share code, notes, and snippets.

View VansRouges's full-sized avatar
:atom:
Reacting

Vance-sama VansRouges

:atom:
Reacting
View GitHub Profile
@adrianhajdin
adrianhajdin / StateContext.js
Last active June 24, 2024 16:56
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);
@adrianhajdin
adrianhajdin / HeaderStyles.js
Created August 5, 2021 06:59
Build and Deploy a Google Maps Travel Companion Application | React.js
import { alpha, makeStyles } from '@material-ui/core/styles';
export default makeStyles((theme) => ({
title: {
display: 'none',
[theme.breakpoints.up('sm')]: {
display: 'block',
},
},
search: {