This file contains 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
export const LIMIT = 10; | |
export const RANGE = 5; |
Easily implement good SEO in your Next js app using next-seo
This file contains 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 Error from "next/error"; | |
import Script from "next/script"; | |
import * as gtag from "utils/ga"; | |
import { useEffect } from "react"; | |
import { AppProps } from "next/app"; | |
import { useRouter } from "next/router"; | |
const App = ({ Component, pageProps, err }: AppProps & { err: Error }) => { | |
const router = useRouter(); |
This file contains 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 { useMemo } from 'react'; | |
const useswitchNetwork = async ( | |
account: string | null | undefined, | |
nextChainId: 1 | 10 | 42 | 69, | |
currentChainId: number | undefined, | |
forceOptimism = false, | |
) => { | |
if (!account) { | |
return; |
This file contains 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
did:3:kjzl6cwe1jw14adt85e30363whpdxq48lwt1lax9meleqpl8lr64wh3zmnjnhez |
This file contains 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 { NextSeo } from 'next-seo'; | |
export interface SeoProps { | |
url?: string; | |
title?: string; | |
description?: string; | |
cover?: string | null; | |
} | |
const SEO = ({ url, title, description, cover }: SeoProps) => { |
This file contains 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
// Sigmoid | |
const sigmoid = x => 1 / (1 + Math.exp(-x)) | |
const D_sigmoid = x => sigmoid(x) * (1-sigmoid(x)) | |
// data | |
const data = [ | |
[ 5.1, 3.5, 0 ], | |
[ 4.9, 3. , 0 ], | |
[ 4.7, 3.2, 0 ], |
This file contains 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
[ | |
{ | |
"label": "آروبا", | |
"value": "آروبا" | |
}, | |
{ | |
"label": "أسبانيا", | |
"value": "أسبانيا" | |
}, | |
{ |
This file contains 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 hexToRgb = hex => { | |
// http://stackoverflow.com/a/5624139 | |
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i | |
hex = hex.replace(shorthandRegex, (m, r, g, b) => { | |
return r + r + g + g + b + b | |
}) | |
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) | |
return result | |
? { |
NewerOlder