Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Download JSON button added #26

Closed
wants to merge 15 commits into from

Conversation

DhairyaMajmudar
Copy link
Contributor

@DhairyaMajmudar DhairyaMajmudar commented Oct 6, 2024

-> Download JSON button is now functional
-> cloese #17
-> related to #16

cc: @seveibar

Copy link

vercel bot commented Oct 6, 2024

@DhairyaMajmudar is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@seveibar
Copy link
Contributor

seveibar commented Oct 6, 2024

can we remove this button? as per the discussion here: #16 (comment)

You could easily adapt this PR to make the Download Circuit JSON button though!

@DhairyaMajmudar
Copy link
Contributor Author

can we remove this button? as per the discussion here: #16 (comment)

You could easily adapt this PR to make the Download Circuit JSON button though!

I got you let me modify this PR for downloading JSON data

@DhairyaMajmudar DhairyaMajmudar changed the title Feat: Download TSX button added Feat: Download JSON button added Oct 7, 2024
Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the download button is clicked, compute the url and direct the user to download. Recomputing and rerunning typescript is too expensive

you can probably pass in the circuit json from the parent as a prop

src/components/DownloadButtonAndMenu.tsx Outdated Show resolved Hide resolved
src/components/DownloadButtonAndMenu.tsx Outdated Show resolved Hide resolved
src/hooks/use-download-json.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments, we don't want to run the tsx (expensive operation) every time the download button renders

@seveibar
Copy link
Contributor

This was completed in #49

@seveibar seveibar closed this Oct 14, 2024
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.

2 participants