Move User to flipper-common
Summary: Move User from reducers to flipper-common. User will now be usable by other modules. Reviewed By: passy Differential Revision: D37599802 fbshipit-source-id: 66412e7ed00bf27448fa2deae70f0e8e80303aba
This commit is contained in:
committed by
Facebook GitHub Bot
parent
54f85029d9
commit
caa04f4a44
16
desktop/flipper-common/src/User.tsx
Normal file
16
desktop/flipper-common/src/User.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*
|
||||||
|
* @format
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type User = {
|
||||||
|
id?: string;
|
||||||
|
name?: string;
|
||||||
|
profile_picture?: {
|
||||||
|
uri: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -64,3 +64,4 @@ export * from './PluginDetails';
|
|||||||
export * from './doctor';
|
export * from './doctor';
|
||||||
export * from './ServerAddOn';
|
export * from './ServerAddOn';
|
||||||
export * from './transport';
|
export * from './transport';
|
||||||
|
export * from './User';
|
||||||
|
|||||||
@@ -7,9 +7,8 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {GraphFileUpload} from 'flipper-common';
|
import {GraphFileUpload, User} from 'flipper-common';
|
||||||
import {Atom, createState} from 'flipper-plugin';
|
import {Atom, createState} from 'flipper-plugin';
|
||||||
import {User} from '../reducers/user';
|
|
||||||
|
|
||||||
export async function getUser(): Promise<User | null> {
|
export async function getUser(): Promise<User | null> {
|
||||||
throw new Error('Feature not implemented');
|
throw new Error('Feature not implemented');
|
||||||
|
|||||||
@@ -8,14 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {Actions} from './';
|
import {Actions} from './';
|
||||||
|
import {User} from 'flipper-common';
|
||||||
export type User = {
|
|
||||||
id?: string;
|
|
||||||
name?: string;
|
|
||||||
profile_picture?: {
|
|
||||||
uri: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export type State = User;
|
export type State = User;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user