()
| 26 | const NO_FID_METADATA = 'NONE'; |
| 27 | |
| 28 | function useCurrentUserFID(): ?string { |
| 29 | // There is a distinction between null & undefined for the fid value. |
| 30 | // If the fid is null this means that the user has decided NOT to set |
| 31 | // a Farcaster association. If the fid is undefined this means that |
| 32 | // the user has not yet been prompted to set a Farcaster association. |
| 33 | const currentUserFID = useSelector( |
| 34 | state => |
| 35 | state.syncedMetadataStore.syncedMetadata[ |
| 36 | syncedMetadataNames.CURRENT_USER_FID |
| 37 | ] ?? undefined, |
| 38 | ); |
| 39 | |
| 40 | if (currentUserFID === NO_FID_METADATA) { |
| 41 | return null; |
| 42 | } |
| 43 | |
| 44 | return currentUserFID; |
| 45 | } |
| 46 | |
| 47 | function useCurrentUserSupportsDCs(): boolean { |
| 48 | const currentUserFIDDCs = useSelector( |
no test coverage detected