1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-21 04:19:37 +02:00

Custom icons for bookmarks

This commit is contained in:
unknown 2021-07-28 12:36:03 +02:00
parent 1fbe0746a4
commit a5d6cf04cf
9 changed files with 169 additions and 48 deletions

View file

@ -1,4 +1,4 @@
import { useState, useEffect, useRef, ChangeEvent, SyntheticEvent } from 'react';
import { useState, useEffect, ChangeEvent, SyntheticEvent } from 'react';
import { connect } from 'react-redux';
import { addApp, updateApp } from '../../../store/actions';
import { App, NewApp } from '../../../interfaces';
@ -25,14 +25,6 @@ const AppForm = (props: ComponentProps): JSX.Element => {
icon: ''
});
const inputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
if (inputRef.current) {
inputRef.current.focus();
}
}, [inputRef])
useEffect(() => {
if (props.app) {
setFormData({
@ -98,6 +90,8 @@ const AppForm = (props: ComponentProps): JSX.Element => {
url: '',
icon: ''
})
setCustomIcon(null);
}
return (
@ -115,7 +109,6 @@ const AppForm = (props: ComponentProps): JSX.Element => {
required
value={formData.name}
onChange={(e) => inputChangeHandler(e)}
ref={inputRef}
/>
</InputGroup>
<InputGroup>