remove React.FC types

pull/4355/head
yann300 11 months ago
parent c4e355b487
commit 945b96f8f7
  1. 2
      apps/doc-gen/src/app/views/ErrorView.tsx
  2. 8
      apps/etherscan/src/app/components/HeaderWithSettings.tsx
  3. 2
      apps/etherscan/src/app/components/SubmitButton.tsx
  4. 2
      apps/etherscan/src/app/layouts/Default.tsx
  5. 2
      apps/etherscan/src/app/views/CaptureKeyView.tsx
  6. 2
      apps/etherscan/src/app/views/ErrorView.tsx
  7. 2
      apps/etherscan/src/app/views/HomeView.tsx
  8. 4
      apps/etherscan/src/app/views/ReceiptsView.tsx
  9. 2
      apps/etherscan/src/app/views/VerifyView.tsx
  10. 2
      apps/remix-ide-e2e/src/local-plugin/src/app/logger.tsx
  11. 2
      apps/vyper/src/app/app.tsx

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
export const ErrorView: React.FC<React.PropsWithChildren> = () => { export const ErrorView = () => {
return ( return (
<div <div
style={{ style={{

@ -13,7 +13,7 @@ interface IconProps {
from: string from: string
} }
const HomeIcon: React.FC<IconProps> = ({from}: IconProps) => { const HomeIcon = ({from}: IconProps) => {
return ( return (
<NavLink <NavLink
data-id="home" data-id="home"
@ -31,7 +31,7 @@ const HomeIcon: React.FC<IconProps> = ({from}: IconProps) => {
) )
} }
const ReceiptsIcon: React.FC<IconProps> = ({from}: IconProps) => { const ReceiptsIcon = ({from}: IconProps) => {
return ( return (
<NavLink <NavLink
data-id="receipts" data-id="receipts"
@ -49,7 +49,7 @@ const ReceiptsIcon: React.FC<IconProps> = ({from}: IconProps) => {
) )
} }
const SettingsIcon: React.FC<IconProps> = ({from}: IconProps) => { const SettingsIcon = ({from}: IconProps) => {
return ( return (
<NavLink <NavLink
data-id="settings" data-id="settings"
@ -67,7 +67,7 @@ const SettingsIcon: React.FC<IconProps> = ({from}: IconProps) => {
) )
} }
export const HeaderWithSettings: React.FC<Props> = ({title = '', from}) => { export const HeaderWithSettings = ({title = '', from}) => {
return ( return (
<div className="d-flex justify-content-between"> <div className="d-flex justify-content-between">
<h6 className="d-inline">{title}</h6> <h6 className="d-inline">{title}</h6>

@ -8,7 +8,7 @@ interface Props {
disable?: boolean disable?: boolean
} }
export const SubmitButton: React.FC<Props> = ({text, dataId, isSubmitting = false, disable = true}) => { export const SubmitButton = ({text, dataId, isSubmitting = false, disable = true}) => {
return ( return (
<div> <div>
<button data-id={dataId} type="submit" className="btn btn-primary btn-block p-1 text-decoration-none" disabled={disable}> <button data-id={dataId} type="submit" className="btn btn-primary btn-block p-1 text-decoration-none" disabled={disable}>

@ -7,7 +7,7 @@ interface Props {
title?: string title?: string
} }
export const DefaultLayout: React.FC<PropsWithChildren<Props>> = ({children, from, title}) => { export const DefaultLayout = ({children, from, title}) => {
return ( return (
<div> <div>
<HeaderWithSettings from={from} title={title} /> <HeaderWithSettings from={from} title={title} />

@ -6,7 +6,7 @@ import {useNavigate, useLocation} from 'react-router-dom'
import {AppContext} from '../AppContext' import {AppContext} from '../AppContext'
import {SubmitButton} from '../components' import {SubmitButton} from '../components'
export const CaptureKeyView: React.FC<React.PropsWithChildren> = () => { export const CaptureKeyView = () => {
const location = useLocation() const location = useLocation()
const navigate = useNavigate() const navigate = useNavigate()
const [msg, setMsg] = useState('') const [msg, setMsg] = useState('')

@ -1,6 +1,6 @@
import React from 'react' import React from 'react'
export const ErrorView: React.FC<React.PropsWithChildren> = () => { export const ErrorView = () => {
return ( return (
<div className="d-flex w-100 flex-column align-items-center"> <div className="d-flex w-100 flex-column align-items-center">
<img className="pb-4" width="250" src="https://res.cloudinary.com/key-solutions/image/upload/v1580400635/solid/error-png.png" alt="Error page" /> <img className="pb-4" width="250" src="https://res.cloudinary.com/key-solutions/image/upload/v1580400635/solid/error-png.png" alt="Error page" />

@ -7,7 +7,7 @@ import {Receipt} from '../types'
import {VerifyView} from './VerifyView' import {VerifyView} from './VerifyView'
export const HomeView: React.FC<React.PropsWithChildren> = () => { export const HomeView = () => {
const context = React.useContext(AppContext) const context = React.useContext(AppContext)
return !context.apiKey ? ( return !context.apiKey ? (

@ -13,7 +13,7 @@ interface FormValues {
receiptGuid: string receiptGuid: string
} }
export const ReceiptsView: React.FC<React.PropsWithChildren> = () => { export const ReceiptsView = () => {
const [results, setResults] = useState({succeed: false, message: ''}) const [results, setResults] = useState({succeed: false, message: ''})
const [isProxyContractReceipt, setIsProxyContractReceipt] = useState(false) const [isProxyContractReceipt, setIsProxyContractReceipt] = useState(false)
const context = React.useContext(AppContext) const context = React.useContext(AppContext)
@ -124,7 +124,7 @@ export const ReceiptsView: React.FC<React.PropsWithChildren> = () => {
) )
} }
const ReceiptsTable: React.FC<{receipts: Receipt[]}> = ({receipts}) => { const ReceiptsTable = ({receipts}) => {
return ( return (
<div className="table-responsive"> <div className="table-responsive">
<h6>Receipts</h6> <h6>Receipts</h6>

@ -24,7 +24,7 @@ interface FormValues {
expectedImplAddress?: string expectedImplAddress?: string
} }
export const VerifyView: React.FC<Props> = ({apiKey, client, contracts, onVerifiedContract, networkName}) => { export const VerifyView ({apiKey, client, contracts, onVerifiedContract, networkName}) => {
const [results, setResults] = useState('') const [results, setResults] = useState('')
const [selectedContract, setSelectedContract] = useState('') const [selectedContract, setSelectedContract] = useState('')
const [showConstructorArgs, setShowConstructorArgs] = useState(false) const [showConstructorArgs, setShowConstructorArgs] = useState(false)

@ -4,7 +4,7 @@ interface loggerProps {
id: string id: string
} }
export const Logger: React.FC<loggerProps> = (props) => { export const Logger = (props) => {
return ( return (
<div id={props.id} className="jumbotron overflow-auto text-break mb-1 p-2"> <div id={props.id} className="jumbotron overflow-auto text-break mb-1 p-2">
{props.log} {props.log}

@ -25,7 +25,7 @@ interface OutputMap {
[fileName: string]: VyperCompilationOutput [fileName: string]: VyperCompilationOutput
} }
const App: React.FC<React.PropsWithChildren> = () => { const App = () => {
const [contract, setContract] = useState<string>() const [contract, setContract] = useState<string>()
const [output, setOutput] = useState<OutputMap>({}) const [output, setOutput] = useState<OutputMap>({})
const [state, setState] = useState<AppState>({ const [state, setState] = useState<AppState>({

Loading…
Cancel
Save