mirror of
https://github.com/kremalicious/blog.git
synced 2025-01-03 10:25:07 +01:00
tsconfig tweaks
This commit is contained in:
parent
b55e66c9df
commit
5cdbb0f429
@ -1,7 +1,7 @@
|
|||||||
import React, { ReactElement } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import { Link, PageProps } from 'gatsby'
|
import { Link, PageProps } from 'gatsby'
|
||||||
import Page from '../components/templates/Page'
|
import Page from '../components/templates/Page'
|
||||||
import * as styles from './404.module.css'
|
import { hal9000, wrapper, title, text } from './404.module.css'
|
||||||
|
|
||||||
const page = {
|
const page = {
|
||||||
frontmatter: {
|
frontmatter: {
|
||||||
@ -15,11 +15,11 @@ const NotFound = (props: PageProps): ReactElement => (
|
|||||||
post={page}
|
post={page}
|
||||||
pathname={props.location.pathname}
|
pathname={props.location.pathname}
|
||||||
>
|
>
|
||||||
<div className={styles.hal9000} />
|
<div className={hal9000} />
|
||||||
|
|
||||||
<div className={styles.wrapper}>
|
<div className={wrapper}>
|
||||||
<h1 className={styles.title}>{"I'm sorry Dave"}</h1>{' '}
|
<h1 className={title}>{"I'm sorry Dave"}</h1>{' '}
|
||||||
<p className={styles.text}>{"I'm afraid I can't do that"}</p>
|
<p className={text}>{"I'm afraid I can't do that"}</p>
|
||||||
<Link to={'/'}>Back to homepage</Link>
|
<Link to={'/'}>Back to homepage</Link>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</Page>
|
||||||
|
@ -2,7 +2,7 @@ import React, { ReactElement } from 'react'
|
|||||||
import { graphql, PageProps } from 'gatsby'
|
import { graphql, PageProps } from 'gatsby'
|
||||||
import Page from '../components/templates/Page'
|
import Page from '../components/templates/Page'
|
||||||
import Tag from '../components/atoms/Tag'
|
import Tag from '../components/atoms/Tag'
|
||||||
import * as styles from './tags.module.css'
|
import { tags } from './tags.module.css'
|
||||||
|
|
||||||
const page = {
|
const page = {
|
||||||
frontmatter: {
|
frontmatter: {
|
||||||
@ -28,7 +28,7 @@ const TagsPage = (props: TagsPageProps): ReactElement => (
|
|||||||
post={page}
|
post={page}
|
||||||
pathname={props.location.pathname}
|
pathname={props.location.pathname}
|
||||||
>
|
>
|
||||||
<ul className={styles.tags}>
|
<ul className={tags}>
|
||||||
{props.data.allMarkdownRemark.group
|
{props.data.allMarkdownRemark.group
|
||||||
.sort((a, b) => b.totalCount - a.totalCount)
|
.sort((a, b) => b.totalCount - a.totalCount)
|
||||||
.map((tag: Tag) => (
|
.map((tag: Tag) => (
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import React, { ReactElement } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import loadable from '@loadable/component'
|
import loadable from '@loadable/component'
|
||||||
import shortid from 'shortid'
|
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { Web3ReactProvider } from '@web3-react/core'
|
import { Web3ReactProvider } from '@web3-react/core'
|
||||||
import { Author } from '../@types/Site'
|
import { Author } from '../@types/Site'
|
||||||
@ -8,21 +7,29 @@ import { useSiteMetadata } from '../hooks/use-site-metadata'
|
|||||||
import { getLibrary } from '../hooks/use-web3'
|
import { getLibrary } from '../hooks/use-web3'
|
||||||
import Qr from '../components/atoms/Qr'
|
import Qr from '../components/atoms/Qr'
|
||||||
import Icon from '../components/atoms/Icon'
|
import Icon from '../components/atoms/Icon'
|
||||||
import * as styles from './thanks.module.css'
|
import {
|
||||||
|
thanks,
|
||||||
|
title,
|
||||||
|
web3,
|
||||||
|
loading,
|
||||||
|
coins as styleCoins,
|
||||||
|
coin,
|
||||||
|
buttonBack
|
||||||
|
} from './thanks.module.css'
|
||||||
|
|
||||||
const LazyWeb3Donation = loadable(
|
const LazyWeb3Donation = loadable(
|
||||||
() => import('../components/molecules/Web3Donation')
|
() => import('../components/molecules/Web3Donation')
|
||||||
)
|
)
|
||||||
|
|
||||||
const Coin = ({ address, author }: { address: string; author: Author }) => (
|
const Coin = ({ address, author }: { address: string; author: Author }) => (
|
||||||
<div className={styles.coin}>
|
<div className={coin}>
|
||||||
<Qr title={address} address={(author as any)[address]} />
|
<Qr title={address} address={(author as any)[address]} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
const BackButton = () => (
|
const BackButton = () => (
|
||||||
<button
|
<button
|
||||||
className={`link ${styles.buttonBack}`}
|
className={`link ${buttonBack}`}
|
||||||
onClick={() => window.history.back()}
|
onClick={() => window.history.back()}
|
||||||
>
|
>
|
||||||
<Icon name="ChevronLeft" /> Go Back
|
<Icon name="ChevronLeft" /> Go Back
|
||||||
@ -42,13 +49,13 @@ export default function Thanks(): ReactElement {
|
|||||||
<meta name="robots" content="noindex,nofollow" />
|
<meta name="robots" content="noindex,nofollow" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
|
||||||
<article className={styles.thanks}>
|
<article className={thanks}>
|
||||||
<BackButton />
|
<BackButton />
|
||||||
<header>
|
<header>
|
||||||
<h1 className={styles.title}>Say Thanks</h1>
|
<h1 className={title}>Say Thanks</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div className={styles.web3}>
|
<div className={web3}>
|
||||||
<header>
|
<header>
|
||||||
<h4>Web3 Wallet</h4>
|
<h4>Web3 Wallet</h4>
|
||||||
<p>Send Ether with MetaMask or Brave.</p>
|
<p>Send Ether with MetaMask or Brave.</p>
|
||||||
@ -56,20 +63,20 @@ export default function Thanks(): ReactElement {
|
|||||||
|
|
||||||
<Web3ReactProvider getLibrary={getLibrary}>
|
<Web3ReactProvider getLibrary={getLibrary}>
|
||||||
<LazyWeb3Donation
|
<LazyWeb3Donation
|
||||||
fallback={<div className={styles.loading}>Loading...</div>}
|
fallback={<div className={loading}>Loading...</div>}
|
||||||
address={author.ether}
|
address={author.ether}
|
||||||
/>
|
/>
|
||||||
</Web3ReactProvider>
|
</Web3ReactProvider>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.coins}>
|
<div className={styleCoins}>
|
||||||
<header>
|
<header>
|
||||||
<h4>Any other wallets</h4>
|
<h4>Any other wallets</h4>
|
||||||
<p>Send Bitcoin or Ether from any wallet.</p>
|
<p>Send Bitcoin or Ether from any wallet.</p>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{coins.map((address: string) => (
|
{coins.map((address: string) => (
|
||||||
<Coin key={shortid.generate()} address={address} author={author} />
|
<Coin key={address} address={address} author={author} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./dist/",
|
"outDir": "./dist/",
|
||||||
"target": "esnext",
|
"target": "es5",
|
||||||
"module": "commonjs",
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"lib": ["dom", "esnext"],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"resolveJsonModule": true,
|
"skipLibCheck": true,
|
||||||
"jsx": "react",
|
"noEmit": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"module": "esnext",
|
||||||
"sourceMap": true,
|
"moduleResolution": "node",
|
||||||
"noImplicitAny": true,
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"jsx": "preserve",
|
||||||
"plugins": [{ "name": "typescript-plugin-css-modules" }]
|
"plugins": [{ "name": "typescript-plugin-css-modules" }]
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "public", ".cache", "*.js"],
|
"exclude": ["node_modules", "public", ".cache", "*.js"],
|
||||||
|
Loading…
Reference in New Issue
Block a user