Skip to content

Conversation

@akash70629
Copy link
Contributor

@akash70629 akash70629 commented Nov 16, 2024

Description

After forking and cloning the repository, I encountered a major issue while setting up the local environment. Upon running npm install and npm start, I received an uncaught runtime error.

To resolve this, you can modify your code to handle the case where the stored theme is a simple string instead of a JSON string. Here's how you can do that:

Retrieving the theme: Instead of using JSON.parse, you directly retrieve the item from local storage.
Checking for storedTheme: If storedTheme is not null (meaning there is a value stored), it will return that value directly, which should be either "dark" or "light".
Fallback: If there’s no stored theme, it defaults to checking the document's class to determine the current theme.
This approach avoids any JSON parsing issues and should fix the "Unexpected token 'd'" error.

I fixed that.

Related Issues

Fixes : #489

Changes Proposed

Changed some line of code on Sidebar.jsx

Checklist

  • I have read and followed the Contribution Guidelines.
  • All new and existing tests passed.
  • I have updated the documentation to reflect the changes I've made.
  • My code follows the code style of this project.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Before

record_000002.mp4

After

record_000003.mp4

@vercel
Copy link

vercel bot commented Nov 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
devdisplay ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2024 3:03pm

@akash70629
Copy link
Contributor Author

@madhukalita please review and merge the PR .

@github-actions
Copy link

github-actions bot commented Mar 2, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

9 similar comments
@github-actions
Copy link

github-actions bot commented Mar 3, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

github-actions bot commented Mar 4, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

github-actions bot commented Mar 5, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

github-actions bot commented Mar 6, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

github-actions bot commented Mar 7, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

github-actions bot commented Mar 8, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

github-actions bot commented Mar 9, 2025

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@github-actions
Copy link

Hi there! This issue is still open. We are looking forward to your response.
Assignees: None

@akash70629 akash70629 closed this by deleting the head repository Mar 11, 2025
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.

🐞[Bug]: Uncaught Runtime Error Prevents Local Development

1 participant