You can view a demo here: https://ma-mock-api-tnecfipuho.now.sh/.
| Method | Endpoint | Type | Description |
|---|
| "use client"; | |
| import { useEffect, useState } from "react"; | |
| const symbols = ["⦂⦂", "⦿", "⊛", "⊚", "⊙", "⦚", "⟁", "⦂⦚"]; | |
| function getRandomSymbol() { | |
| const randomIndex = Math.floor(Math.random() * symbols.length); | |
| return symbols[randomIndex]; | |
| } |
| import { IncomingMessage } from "http"; | |
| import { NextApiRequest, NextApiResponse } from "next"; | |
| import NextAuth, { type NextAuthOptions } from "next-auth"; | |
| import CredentialsProvider from "next-auth/providers/credentials"; | |
| import { getCsrfToken } from "next-auth/react"; | |
| import { SiweMessage } from "siwe"; | |
| export function getAuthOptions(req: IncomingMessage): NextAuthOptions { | |
| const providers = [ | |
| CredentialsProvider({ |
| import { useAccount } from "wagmi"; | |
| import { useENS } from "./useENS"; | |
| export function MyComponent() { | |
| const { address: connectedAddress } = useAccount(); | |
| const { displayName } = useENS(connectedAddress); | |
| return ( | |
| <> | |
| {connectedAddress ? ( |
| // SPDX-License-Identifier: CC0-1.0 | |
| pragma solidity ^0.8.14; | |
| interface IPhotoCollection { | |
| function getOriginalsBaseURI() external view returns (string memory); | |
| function getOriginalTokenId(uint256 editionId) external pure returns (uint256); | |
| function getRawEditionPhotoData(uint256 id) external view returns (bytes memory); |
| //SPDX-License-Identifier: Unlicense | |
| /// @title: cozy co. membership | |
| /// @author: The Stitcher AKA samking.eth | |
| /* | |
| :-.:- .-:.=: -==. :- .=== .==: :-::- .--.-: | |
| *@%..=@--%@+ %@# .#%%@@#-+.-@@# #@@- +@@: -@*:%@# *@%. | |
| %@@: :.-@@% .@@@ ....:-: %@@: -@@# +@@= ::.@@@. %@@: |
| function gridToPairOfUint160(grid) { | |
| let gridR = grid.map((_, index) => [grid].map((row) => row[index]).reverse()); | |
| let grid2R = gridR[0].map((_, index) => | |
| gridR.map((row) => row[index]).reverse() | |
| )[0]; | |
| let leftPart = 0n; | |
| let rightPart = 0n; | |
| for (let i = 0; i < 14; i++) { | |
| for (let j = 0; j < 22; j++) { | |
| const power = BigInt(13 - i) + 14n * BigInt(j % 11); |
| import "styled-components"; | |
| import theme from "./theme"; // Or wherever your theme object is | |
| type Theme = typeof theme; | |
| declare module "styled-components" { | |
| export interface DefaultTheme extends Theme {} | |
| } |
| import { Resolvers } from "./schema-types"; | |
| const users = [ | |
| { | |
| id: "user-1", | |
| name: "Sam", | |
| commentIds: ["comment-2"] | |
| } | |
| ]; |
| // containers/App.js | |
| import React from 'react'; | |
| import { BrowserRouter as Router, Route } from 'react-router-dom'; | |
| import { compose, lifecycle } from 'recompose'; | |
| import { provideState, injectState } from 'freactal'; | |
| import { initialState, effects, computed } from 'state'; | |
| import Summary from 'components/Summary'; | |
| const provider = provideState({ |
You can view a demo here: https://ma-mock-api-tnecfipuho.now.sh/.
| Method | Endpoint | Type | Description |
|---|