Make isLoggedIn report user value instead of bool
Summary: It makes little sense to hide this info from developers. It was also requested by antonk52 Reviewed By: LukeDefeo Differential Revision: D44631235 fbshipit-source-id: 1756c5ca2a95b2f815f8c4336621d3c057b704f2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7edaf24d5c
commit
b3307baafe
@@ -7,7 +7,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {isLoggedIn} from '../../fb-stubs/user';
|
||||
import {currentUser} from '../../fb-stubs/user';
|
||||
import {Layout, useValue} from 'flipper-plugin';
|
||||
import React from 'react';
|
||||
import config from '../../fb-stubs/config';
|
||||
@@ -15,7 +15,7 @@ import {Alert} from 'antd';
|
||||
import {LoginOutlined} from '@ant-design/icons';
|
||||
|
||||
export const RequireLogin: React.FC<{}> = ({children}) => {
|
||||
const loggedIn = useValue(isLoggedIn());
|
||||
const loggedIn = useValue(currentUser());
|
||||
if (!config.isFBBuild) {
|
||||
return (
|
||||
<Layout.Container pad>
|
||||
|
||||
Reference in New Issue
Block a user