Skip to content

fix: correct localStorage keys and reset state in resetCode (#143)#158

Open
devendra-w wants to merge 3 commits into
Debmallya-03:mainfrom
devendra-w:feat/reset-button
Open

fix: correct localStorage keys and reset state in resetCode (#143)#158
devendra-w wants to merge 3 commits into
Debmallya-03:mainfrom
devendra-w:feat/reset-button

Conversation

@devendra-w

Copy link
Copy Markdown
Contributor

Closes #143

Changes Made

  • Fixed incorrect localStorage keys in resetCode (was using webify-code-html/css/javascript, corrected to webify_code and webify_template_snapshots which match the actual autosave keys used in the codebase)
  • Added setCurrentTemplateId(null) and setTemplateSnapshots({}) to fully reset editor state on reset
  • Reset button was already present in the toolbar and wired up correctly

How to Test

  1. Load any template or write some code in the editors
  2. Click the Reset button in the toolbar
  3. Confirm the dialog
  4. All three editors (HTML, CSS, JS) should clear
  5. Refreshing the page should not restore the old code (localStorage cleared correctly)

Screenshots

image

@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@devendra-w is attempting to deploy a commit to the debmallya-03's projects Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploy Preview for webifynet failed. Why did it fail? →

Name Link
🔨 Latest commit 6f91e0e
🔍 Latest deploy log https://app.netlify.com/projects/webifynet/deploys/6a205d874c14940008f0d6ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add a Reset button to clear all editor tabs back to default state

1 participant