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 "hashes/poseidon/poseidon" as poseidon | |
const u32[32] powers_of_two = [ | |
1, | |
2, | |
4, | |
8, | |
16, | |
32, | |
64, |
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 "hashes/poseidon/poseidon" as poseidon | |
const u32[32] powers_of_two = [ | |
1, | |
2, | |
4, | |
8, | |
16, | |
32, | |
64, |
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
function cntl(template: TemplateStringsArray, ...templateElements: any[]) { | |
return template | |
.reduce((sum, n, index) => { | |
const templateElement = templateElements[index]; | |
if (typeof templateElement === 'string') { | |
return `${sum}${n}${templateElement}`; | |
} | |
return `${sum}${n}`; | |
}, '') | |
.trim() |
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 React from 'react'; | |
import cntl from 'cntl'; | |
const buttonCN = ({ isRed }: { isRed: boolean }) => cntl` | |
hover:bg-blue-700 | |
text-white | |
font-bold | |
py-2 | |
px-4 | |
rounded |
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 React from 'react'; | |
import cntl from 'cntl'; | |
const wrapperCN = cntl` | |
max-w-sm | |
rounded | |
overflow-hidden | |
shadow-lg | |
`; |
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 React from 'react'; | |
import cntl from 'cntl'; | |
const Card = () => ( | |
<div className="max-w-sm rounded overflow-hidden shadow-lg"> | |
<img className="w-full" src="/img/card-top.jpg" alt="Sunset in the mountains" /> | |
<div className="px-6 py-4"> | |
<div className="font-bold text-xl mb-2">The Coldest Sunset</div> | |
<p className="text-gray-700 text-base"> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus quia, nulla! Maiores et perferendis |
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
FROM node:10-alpine as build | |
WORKDIR /usr/src/app | |
COPY package.json . | |
COPY yarn.lock . | |
COPY packages/shared ./packages/shared | |
COPY packages/api ./packages/api | |
RUN yarn install --pure-lockfile --non-interactive |
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 React from 'react'; | |
import App from 'next/app'; | |
import { ApolloProvider } from '@apollo/react-hooks'; | |
import { ApolloClient } from 'apollo-boost'; | |
import getConfig from 'next/config'; | |
import withApollo from 'src/lib/withApollo'; | |
import { GlobalStyles } from 'src/styles/GlobalStyles'; | |
const { publicRuntimeConfig } = getConfig(); |
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 withApollo from 'next-with-apollo'; | |
import ApolloClient, { InMemoryCache } from 'apollo-boost'; | |
export default (uri: string) => | |
withApollo( | |
props => | |
new ApolloClient({ | |
uri, | |
cache: new InMemoryCache().restore(props.initialState || {}), | |
credentials: 'include', |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": "src" | |
} | |
} |
NewerOlder