Page MenuHomePhabricator

[landing] introduce ConnectFarcaster
ClosedPublic

Authored by ginsu on Mar 27 2024, 9:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 7:48 PM
Unknown Object (File)
Sun, Apr 7, 6:58 PM
Unknown Object (File)
Sun, Apr 7, 2:13 PM
Unknown Object (File)
Sun, Apr 7, 12:51 PM
Unknown Object (File)
Sat, Apr 6, 6:14 PM
Unknown Object (File)
Sat, Apr 6, 12:51 AM
Unknown Object (File)
Fri, Apr 5, 10:53 PM
Unknown Object (File)
Fri, Apr 5, 1:12 PM
Subscribers

Details

Summary

introduce ConnectFarcaster component. This component should return null as the purpose of this component is to call the useSignIn hook from @farcaster/auth-kit and return it to the react native webview component (introduced in subsequent diffs)

Depends on D11427

Test Plan

Confirmed that I was able to get both the farcaster_url and the farcaster_data back in the native message webview whenever this component was rendered in the native webview component + tested the entire sign in flow during the hackathon

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Mar 27 2024, 9:30 PM
atul added inline comments.
landing/connect-farcaster.react.js
80 ↗(On Diff #38410)

Do we really need this?

84–88 ↗(On Diff #38410)

Wouldn't hurt to memoize

This revision is now accepted and ready to land.Mar 28 2024, 5:49 AM
landing/connect-farcaster.react.js
80 ↗(On Diff #38410)

I believe so... I don't think undefined is a valid React.Node

landing/connect-farcaster.react.js
80 ↗(On Diff #38410)

Oh wait, totally my mistake. I lost track of opening/closing braces and thought this was inside the useEffect.

This is totally fine

This revision was automatically updated to reflect the committed changes.