Skip to content

Commit 2dc4b10

Browse files
committed
Render placeholder for older thank you event
We currently show a preview of the original recommendation using the events currently shown on the page, basically rendering it again under the thank you event. But if the event is older than the current events shown on the page, it does not render anything, which is confusing for users. Show a placeholder instead of nothing, until we have a better way to fetch the event in question.
1 parent f89283c commit 2dc4b10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: frontend/js/src/user-feed/UserFeed.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,10 @@ export default function UserFeedPage() {
779779
const subEvent = events?.find(
780780
(evt) => evt.id === original_event_id && evt.event_type === original_event_type
781781
);
782+
if(!subEvent){
783+
// Search for the event?
784+
subEventElement = <div className="muted">Load more evens to preview this older event</div>
785+
}
782786
subEventElement = renderSubEvent(subEvent);
783787
}
784788

0 commit comments

Comments
 (0)