fix: clean type errors

This commit is contained in:
joel@joellee.org committed 2022-07-24 18:22:16 +08:00
1 parent 9062a3e671
commit 4e457fccee
3 files changed
+10 -8

No files matched your search

@@ -10,7 +10,7 @@ interface Props {
const CreateBucketModal: FC<Props> = ({
visible = false,
onSelectCancel = () => {},
onSelectSave = () => {},
onSelectSave = (bucketName: string, isPublic: boolean) => {},
}) => {
const [saving, setSaving] = useState(false)
const [error, setError] = useState('')
@@ -25,7 +25,7 @@ const CreateBucketModal: FC<Props> = ({
setIsPublic(false)
}, [visible])
const onCreateBucket = (event) => {
const onCreateBucket = (event: React.MouseEvent<HTMLElement>) => {
if (event) {
event.preventDefault()
}
@@ -1,12 +1,14 @@
import { FC } from 'react'
import SVG from 'react-inlinesvg'
const StorageUsage: FC = () => {
interface Props {}
const StorageUsage: FC<Props> = () => {
return (
<div className="w-full h-full flex flex-col items-center justify-center">
<SVG
src={'/img/storage-usage.svg'}
alt={'storage-usage'}
title={'storage-usage'}
preProcessor={(code) =>
code.replace(/svg/, 'svg class="w-20 h-20 text-color-inherit opacity-75"')
}
@@ -4,7 +4,7 @@ import ConfirmationModal from 'components/ui/ConfirmationModal'
interface Props {
visible: boolean
bucket: object
bucket: any
onSelectCancel: () => {}
onSelectSave: () => {}
}
@@ -13,7 +13,7 @@ const ToggleBucketPublicModal: FC<Props> = ({
visible = false,
bucket = {},
onSelectCancel = () => {},
onSelectSave = () => {},
onSelectSave = (bucket: any) => {},
}) => {
const [saving, setSaving] = useState(false)
@@ -26,7 +26,7 @@ const ToggleBucketPublicModal: FC<Props> = ({
onSelectSave(bucket)
}
const title = bucket.public
const header = bucket.public
? `Confirm making ${bucket.name} private`
: `Confirm making ${bucket.name} public`
@@ -42,7 +42,7 @@ const ToggleBucketPublicModal: FC<Props> = ({
<ConfirmationModal
danger
visible={visible}
title={title}
header={header}
children={
<div className="py-4">
<Modal.Content>