From 8f75f0a5e75778a60e8030bb45b19289c0af502e Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Mon, 22 Jan 2024 11:03:41 +0630 Subject: [PATCH] fix: update back button to redirect to home when no route history (#241) Update back button in PostDetails.astro to redirect to home page when there's no route history. If a blog post url is pasted in the browser and there's no route history ,prior to this commit, back button did not work as expected. Now, if there's somewhere to go back, the back button will go back to the previous route. If not, the back button will redirect to home page. --- src/layouts/PostDetails.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index 6ca8ea7..e3314c9 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -50,7 +50,7 @@ const layoutProps = {