Open
Description
Description:
The Admin Editor Preview page currently pulls blog post content directly from localStorage
. However:
- If
localStorage
is empty (e.g. after reload or new browser), no content is shown. - If
localStorage
has stale or unrelated post content, it incorrectly displays that instead of the correct post.
Expected Behavior:
- The preview should first attempt to get the correct content based on the current post (e.g. via
slug
). - If no relevant content exists in
localStorage
, it should fallback to fetching from the backend. - It must validate that the content in
localStorage
matches the currently previewed post (e.g. compare slugs).
Steps to Reproduce:
- Save or preview one post.
- Open a different post's preview page.
- Observe that content from the previous post appears (or nothing appears if localStorage is empty).