import React, {useEffect} from 'react';
import {Navigation} from '@interfaces/navigation';
import {CallConnectionFeedback} from '@modules/calls/components/CallConnectionFeedback';
import {Screens} from '@shared/constants';

export function IncomingCallScreen({
  route: {
    params: {callId},
  },
  navigation,
}: Navigation<Screens.CALLS_INCOMING_CALL>) {
  useEffect(() => {
    navigation.replace(Screens.CALLS_CALL, {
      callId: callId,
      isCaller: false,
    });
  }, [callId, navigation]);

  return <CallConnectionFeedback isError={false} isLoading />;
}
