Skip to content

Commit

Permalink
chore(lib): format lib index.tsx to suppress lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Jan 17, 2022
1 parent 7ad7091 commit f5156ea
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
NativeSyntheticEvent,
} from 'react-native';


type ReactNativeLivestreamProps = {
style: ViewStyle;
liveStreamKey: string;
Expand Down Expand Up @@ -39,9 +38,9 @@ type ReactNativeLivestreamNativeProps = {
videoOrientation?: 'landscape' | 'portrait';
audioMuted?: boolean;
audioBitrate?: number;
onConnectionSuccess?: (event: NativeSyntheticEvent<{ }>) => void;
onConnectionSuccess?: (event: NativeSyntheticEvent<{}>) => void;
onConnectionFailed?: (event: NativeSyntheticEvent<{ code: string }>) => void;
onDisconnect?: (event: NativeSyntheticEvent<{ }>) => void;
onDisconnect?: (event: NativeSyntheticEvent<{}>) => void;
};

export type ReactNativeLivestreamMethods = {
Expand All @@ -51,9 +50,10 @@ export type ReactNativeLivestreamMethods = {
disableAudio: () => void;
};

export const ReactNativeLivestreamViewNative = requireNativeComponent<ReactNativeLivestreamNativeProps>(
'ReactNativeLivestreamView'
);
export const ReactNativeLivestreamViewNative =
requireNativeComponent<ReactNativeLivestreamNativeProps>(
'ReactNativeLivestreamView'
);

ReactNativeLivestreamViewNative.displayName = 'ReactNativeLivestreamViewNative';

Expand All @@ -62,14 +62,20 @@ const LivestreamView = forwardRef<
ReactNativeLivestreamProps
>(
(
{ style, video, rtmpServerUrl, liveStreamKey, audio, onConnectionSuccess, onConnectionFailed, onDisconnect },
{
style,
video,
rtmpServerUrl,
liveStreamKey,
audio,
onConnectionSuccess,
onConnectionFailed,
onDisconnect,
},
forwardedRef
) => {

const onConnectionSuccessHandler = (
event: NativeSyntheticEvent<{}>
) => {
const { } = event.nativeEvent;
const onConnectionSuccessHandler = (event: NativeSyntheticEvent<{}>) => {
const {} = event.nativeEvent;
onConnectionSuccess?.();
};

Expand All @@ -80,10 +86,8 @@ const LivestreamView = forwardRef<
onConnectionFailed?.(code);
};

const onDisconnectHandler = (
event: NativeSyntheticEvent<{}>
) => {
const { } = event.nativeEvent;
const onDisconnectHandler = (event: NativeSyntheticEvent<{}>) => {
const {} = event.nativeEvent;
onDisconnect?.();
};

Expand Down

0 comments on commit f5156ea

Please sign in to comment.