^(?:(?!node_modules).)*(?:node_modules)(\/|$)(?!.*(?:node_modules))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference | |
https://github.com/oyedeletemitope/page-transition-in-react-using-framer-motion/blob/master/src/App.js#L5 | |
import React from "react"; | |
import { Routes, Route, useLocation } from "react-router-dom"; | |
import Home from "./Home"; | |
import Contact from "./Contact"; | |
import About from "./About"; | |
import { AnimatePresence } from "framer-motion"; | |
function AnimatedRoutes() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isLocalhost = Boolean( | |
window.location.hostname === 'localhost' || | |
// [::1] is the IPv6 localhost address. | |
window.location.hostname === '[::1]' || | |
// 127.0.0.0/8 are considered localhost for IPv4. | |
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) | |
); | |
export function register(config) { | |
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function saveToFile(html) { | |
await fs.writeFile("./content.html", html, "utf-8"); | |
console.log("file saved to " + process.cwd() + "/content.html"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
// Author: vectorized.eth | |
pragma solidity ^0.8.0; | |
pragma abicoder v2; | |
// DISCLAIMER: | |
// This is experimental software and is provided on an "as is" and "as available" basis. | |
// We do not give any warranties and will not be liable for any loss incurred through any use of this codebase. | |
library Base64 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import { Override, Data, AnimationControls, useAnimation } from "framer" | |
import { useAnimationSequence } from "./useAnimationSequence" | |
import { animationSequence } from "./animationSequence" | |
// Learn more: https://framer.com/docs/overrides/ | |
let heart1: AnimationControls | |
let heart2: AnimationControls | |
let heart3: AnimationControls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Navigate, Outlet } from "react-router-dom"; | |
function PrivateRoute({ isLogged }) { | |
return isLogged ? <Outlet /> : <Navigate to="/" />; | |
} | |
export default PrivateRoute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store > global > CombinedContextProviders.js | |
//https://codesandbox.io/s/how-to-use-contex-use-reducer-use-memo-forked-zf1k65?file=/src/components/DisplayAuth.js:0-472 | |
import ContextProviderComposer from "./ContextProviderComposer"; | |
import { GlobalStateProvider } from "./global/global.provider"; | |
const CombinedContextProviders = ({ children }) => { | |
return ( | |
<ContextProviderComposer | |
contextProviders={[<GlobalStateProvider key={"global_state_provider"} />]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import { | |
Frame, | |
addPropertyControls, | |
ControlType, | |
useMotionValue, | |
Color, | |
useAnimation, | |
animate, | |
} from "framer" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from "react" | |
import { motion } from "framer-motion" | |
import { addPropertyControls, ControlType } from "framer" | |
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from "chart.js" | |
import { Doughnut } from "react-chartjs-2" | |
ChartJS.register(ArcElement, Tooltip, Legend) | |
export default function Chart(props) { | |
const { tint, style, data1, data2, data3, data4, data5, data6 } = props |