From 929d9fc816932a9c91b4515dd8056423e99f5c2f Mon Sep 17 00:00:00 2001 From: erik-sn Date: Sat, 26 Sep 2020 20:45:16 -0400 Subject: [PATCH] add auto focus to media field --- phone/src/apps/twitter/components/ImageDisplay.js | 10 +--------- phone/src/apps/twitter/components/ImagePrompt.js | 1 + 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/phone/src/apps/twitter/components/ImageDisplay.js b/phone/src/apps/twitter/components/ImageDisplay.js index 1e84715..5ed6ceb 100644 --- a/phone/src/apps/twitter/components/ImageDisplay.js +++ b/phone/src/apps/twitter/components/ImageDisplay.js @@ -1,22 +1,14 @@ import React from "react"; -import { makeStyles } from "@material-ui/core/styles"; import Image from "./Image"; -const useStyles = makeStyles((theme) => ({ - root: { - margin: "2px 0px", - }, -})); - export const ImageDisplay = ({ visible, images, removeImage, small }) => { - const classes = useStyles(); if (!visible || !images || images.length === 0) return null; const styles = { margin: small ? "2px 0px" : "2px 15px" }; return ( -
+
{images.map((image) => ( { multiline size="small" placeholder={t("APPS_TWITTER_IMAGE_PLACEHOLDER")} + inputRef={(input) => input && input.focus()} /> ); };