nicolium: clear rss feed field on submit, styles
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -8,7 +8,7 @@ const useTextField = (initialValue?: string) => {
|
||||
const [value, setValue] = useState(initialValue);
|
||||
const hasInitialValue = typeof initialValue === 'string';
|
||||
|
||||
const onChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement> = (e) => {
|
||||
const onChange = (e: { target: { value: string } }) => {
|
||||
setValue(e.target.value);
|
||||
};
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ const NewFeedForm: React.FC = () => {
|
||||
createRssFeedSubscription(url.value, {
|
||||
onSuccess() {
|
||||
toast.success(messages.createSuccess);
|
||||
url.onChange({ target: { value: '' } });
|
||||
},
|
||||
onError() {
|
||||
toast.error(messages.createFail);
|
||||
@@ -125,7 +126,9 @@ const RssFeedSubscriptions = () => {
|
||||
{feed.image_url ? (
|
||||
<Avatar size={40} src={feed.image_url} />
|
||||
) : (
|
||||
<Icon src={iconRss} size={40} />
|
||||
<div className='flex size-10 items-center justify-center rounded-full rounded-lg bg-gray-200 text-gray-900 dark:bg-gray-700 dark:text-gray-100'>
|
||||
<Icon src={iconRss} size={32} />
|
||||
</div>
|
||||
)}
|
||||
<div className='flex flex-1 flex-col'>
|
||||
<span>{feed.title}</span>
|
||||
|
||||
Reference in New Issue
Block a user