mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-22 01:46:51 +01:00
fix all type errors
This commit is contained in:
parent
9124ecfb82
commit
67c4aa1ea2
@ -19,17 +19,17 @@ export function Icon(props: Props) {
|
||||
width = toAttributeSize(width)
|
||||
height = toAttributeSize(height)
|
||||
|
||||
const style = {
|
||||
'width': '1em',
|
||||
'height': '1em',
|
||||
'stroke': 'currentcolor',
|
||||
'strokeWidth': 'var(--border-width)',
|
||||
'strokeLinecap': 'round',
|
||||
'strokeLinejoin': 'round',
|
||||
'fill': 'none',
|
||||
'verticalAlign': 'baseline'
|
||||
const style = {
|
||||
width: '1em',
|
||||
height: '1em',
|
||||
stroke: 'currentcolor',
|
||||
strokeWidth: 'var(--border-width)',
|
||||
strokeLinecap: 'round',
|
||||
strokeLinejoin: 'round',
|
||||
fill: 'none',
|
||||
verticalAlign: 'baseline'
|
||||
}
|
||||
|
||||
return <svg width={width} height={height} fill="none" viewBox="0 0 24 24" {...props} style={style}>{title ? (<title>{title}</title>) : ''}${innerSVG}</svg>
|
||||
return <svg width={width} height={height} fill="none" viewBox="0 0 24 24" {...props} style={style as any}>{title ? (<title>{title}</title>) : ''}${innerSVG}</svg>
|
||||
}
|
||||
`
|
||||
|
@ -45,6 +45,7 @@ export function TokenSelect() {
|
||||
</Select.Icon>
|
||||
</Select.Trigger>
|
||||
|
||||
{/* @ts-expect-error-next-line: style actually is passed through and is needed in our case */}
|
||||
<Select.Portal style={{ zIndex: 10 }}>
|
||||
<Select.Content className="SelectContent">
|
||||
<Select.ScrollUpButton className="SelectScrollButton">
|
||||
|
@ -2,10 +2,11 @@ import { useEffect, useState } from 'react'
|
||||
import useSWR from 'swr'
|
||||
import type { GetToken } from '@features/Web3/stores/tokens'
|
||||
import { useNetwork, useAccount } from 'wagmi'
|
||||
import { fetcher } from '@stores/fetcher'
|
||||
import { $setTokens } from '@features/Web3/stores/tokens'
|
||||
import { $setSelectedToken } from '@features/Web3/stores/selectedToken'
|
||||
|
||||
const fetcher = (url: string) => fetch(url).then((res) => res.json())
|
||||
|
||||
//
|
||||
// Wrapper for fetching user tokens with swr.
|
||||
//
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { nanoquery } from '@nanostores/query'
|
||||
import { type Fetcher, nanoquery } from '@nanostores/query'
|
||||
|
||||
export async function fetcher(...args: (string | number)[]) {
|
||||
export const fetcher: Fetcher<unknown> = async (
|
||||
...args: any[]
|
||||
): Promise<unknown> => {
|
||||
const res = await fetch(args.join(''))
|
||||
return await res.json()
|
||||
}
|
||||
|
@ -17,7 +17,11 @@
|
||||
},
|
||||
"typeRoots": ["./src/@types", "./node_modules/@types"]
|
||||
},
|
||||
"exclude": ["src/images/components", "src/content"],
|
||||
"exclude": [
|
||||
"src/images/components/**/*",
|
||||
"src/content",
|
||||
"scripts/create-icons/tmp/"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"content/**/*",
|
||||
|
Loading…
Reference in New Issue
Block a user