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: pass input text through post action #201

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

cnasc
Copy link
Contributor

@cnasc cnasc commented Feb 29, 2024

What changed? Why?
Part of #146
Passing input text value in the frame action.

Also cleaned up some lint/type errors while I was in there.

Notes to reviewers

How has it been tested?

@cnasc cnasc mentioned this pull request Feb 29, 2024
19 tasks
fid: 0,
messageHash: '0xthisisnotreal',
network: 0,
timestamp: 0,
});
setResults((prev) => [...prev, result]);
Copy link
Contributor Author

@cnasc cnasc Feb 29, 2024

Choose a reason for hiding this comment

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

we got a type error on this because postFrame may return an undefined value, and only defined values should go in the results array.

fid: 0,
messageHash: '0xthisisnotreal',
network: 0,
timestamp: 0,
});
setResults((prev) => [...prev, result]);
// TODO: handle when result is not defined
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably should be an error toast or something

@@ -140,7 +152,7 @@ function FrameButton({
openModal(onConfirm);
}
// TODO: implement other actions (mint, etc.)
}, [button, setResults]);
}, [button?.action, button?.index, button?.target, inputText, openModal, setResults]);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had a warning here because openModal wasn't included as dep. The other formatting was done automatically by IDE.

@cnasc cnasc requested a review from Zizzamia February 29, 2024 04:01
@Zizzamia Zizzamia merged commit 8165896 into main Feb 29, 2024
9 checks passed
@Zizzamia Zizzamia deleted the cjn/minor-polish branch February 29, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants