Skip to content

Commit

Permalink
修复类型错误
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafYeeXYZ committed May 15, 2024
1 parent 891879e commit f990a20
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"swiper": "^11.1.3"
},
"devDependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"@types/react": "npm:types-react@beta",
"@types/react-dom": "npm:types-react-dom@beta",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@vitejs/plugin-react": "^4.2.1",
Expand Down
37 changes: 22 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/Prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ interface PromptProps {
status: React.MutableRefObject<string>
children: JSX.Element
geneMode: 'textToImage' | 'imageToImage'
fileRef: React.RefObject<HTMLInputElement>
fileRef: React.RefObject<HTMLInputElement | null>
setLoadingImage: React.Dispatch<React.SetStateAction<React.JSX.Element | null>>
promptRef: React.RefObject<HTMLTextAreaElement>
promptRef: React.RefObject<HTMLTextAreaElement | null>
}

class ErrorInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Widgets/ImageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { DialogAction } from "../../libs/useDialog"
import { LangContext } from "../../lang"

interface ImageSelectorProps {
ref: React.RefObject<HTMLInputElement>
ref: React.RefObject<HTMLInputElement | null>
geneMode: 'textToImage' | 'imageToImage'
dialogAction: React.Dispatch<DialogAction>
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Widgets/PromptGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { flushSync } from 'react-dom'
import { LangContext } from '../../lang'

interface PromptGeneratorProps {
status: React.MutableRefObject<string>
status: React.RefObject<string>
dialogAction: React.Dispatch<DialogAction>
promptRef: React.RefObject<HTMLTextAreaElement>
promptRef: React.RefObject<HTMLTextAreaElement | null>
}

export default function PromptGenerator({ status, dialogAction, promptRef }: PromptGeneratorProps) {
Expand Down

0 comments on commit f990a20

Please sign in to comment.