diff --git a/web/ui/src/YBFeed/YBFeedComponent.tsx b/web/ui/src/YBFeed/YBFeedComponent.tsx
index 9ed6212..daf2f38 100644
--- a/web/ui/src/YBFeed/YBFeedComponent.tsx
+++ b/web/ui/src/YBFeed/YBFeedComponent.tsx
@@ -203,6 +203,7 @@ export function FeedComponent() {
:""}
+
{!fatal?
<>
{authenticated===true?
@@ -232,7 +233,7 @@ export function FeedComponent() {
-
+
diff --git a/web/ui/src/YBFeed/YBFeedItemComponent.tsx b/web/ui/src/YBFeed/YBFeedItemComponent.tsx
index 7558d11..2685b9c 100644
--- a/web/ui/src/YBFeed/YBFeedItemComponent.tsx
+++ b/web/ui/src/YBFeed/YBFeedItemComponent.tsx
@@ -13,6 +13,7 @@ import { FeedItem } from '.'
export interface FeedItemHeadingProps {
item: FeedItem,
+ onDelete?: () => void
}
function YBHeading(props: FeedItemHeadingProps) {
const { item } = props
@@ -27,7 +28,12 @@ function YBHeading(props: FeedItemHeadingProps) {
method: "DELETE",
credentials: "include"
})
- .then(() => setDeleteModalOpen(false))
+ .then(() => {
+ setDeleteModalOpen(false)
+ if (props.onDelete) {
+ props.onDelete()
+ }
+ })
}
return (
@@ -53,6 +59,7 @@ export interface FeedItemProps {
item: FeedItem,
showCopyButton?: boolean
onUpdate?: (item: FeedItemProps) => void
+ onDelete?: () => void
}
export function YBFeedItem(props: FeedItemProps) {
@@ -68,7 +75,7 @@ export function YBFeedItem(props: FeedItemProps) {
return(
-
+
{component}
)
diff --git a/web/ui/src/YBFeed/YBFeedItemsComponent.tsx b/web/ui/src/YBFeed/YBFeedItemsComponent.tsx
index db4ed3d..5d11ed6 100644
--- a/web/ui/src/YBFeed/YBFeedItemsComponent.tsx
+++ b/web/ui/src/YBFeed/YBFeedItemsComponent.tsx
@@ -3,6 +3,7 @@ import { FeedItem, FeedItemProps, YBFeedItem } from './'
export interface FeedItemsProps {
items: FeedItem[],
onUpdate?: (item: FeedItemProps) => void
+ onDelete?: () => void
}
export function FeedItems(props: FeedItemsProps) {
@@ -10,7 +11,7 @@ export function FeedItems(props: FeedItemsProps) {
return(
<>
{items.map((f:FeedItem) =>
-
+
)}
>
)
diff --git a/web/ui/src/YBFeed/YBPasteCardComponent.tsx b/web/ui/src/YBFeed/YBPasteCardComponent.tsx
index bc2fba9..86fc85c 100644
--- a/web/ui/src/YBFeed/YBPasteCardComponent.tsx
+++ b/web/ui/src/YBFeed/YBPasteCardComponent.tsx
@@ -4,6 +4,7 @@ import { useParams } from 'react-router-dom'
interface PasteCardProps {
empty?: boolean
+ onPaste: () => void
}
export function YBPasteCard(props:PasteCardProps) {
@@ -46,6 +47,7 @@ export function YBPasteCard(props:PasteCardProps) {
})
.then(() => {
setTextFieldValue("")
+ props.onPaste()
})
}
const handleFinish = () => {