Pythonidaer / reddie

React app for saving and retrieving Reddit comments.
0 stars 1 forks source link

When SavedComment is deleted from SavedCommentScreen, the page errors out #25

Open Pythonidaer opened 1 year ago

Pythonidaer commented 1 year ago

Technically this would happen too on SavedCommentsScreen (note the plural) if there were 0 saved comments left.

The short-term solution was to apply "window.location.reload()', but there has to be some data that is returned that we can test to use as a re-direct (otherwise maybe just redirect SavedCommentScreen to SavedCommentsScreen when reloaded, and if SavedCommentsScreen has 0 comments come back, to redirect to the home page.

Currently there are some bugs here.

To replicate: