diff options
Diffstat (limited to 'src/view/com/modals/AltImage.tsx')
-rw-r--r-- | src/view/com/modals/AltImage.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view/com/modals/AltImage.tsx b/src/view/com/modals/AltImage.tsx index e6e2ed831..639303c98 100644 --- a/src/view/com/modals/AltImage.tsx +++ b/src/view/com/modals/AltImage.tsx @@ -15,14 +15,15 @@ import {isDesktopWeb} from 'platform/detection' export const snapPoints = ['80%'] interface Props { + prevAltText: string onAltTextSet: (altText?: string | undefined) => void } -export function Component({onAltTextSet}: Props) { +export function Component({prevAltText, onAltTextSet}: Props) { const pal = usePalette('default') const store = useStores() const theme = useTheme() - const [altText, setAltText] = useState('') + const [altText, setAltText] = useState(prevAltText) const onPressSave = useCallback(() => { onAltTextSet(altText) |