import React from 'react';
import {View} from 'react-native';
import {SharedPost as SharedPostComponent} from '@components/_custom/Post/components/SharedPost';
import {PostMetadata} from '@modules/post/interfaces';

import {styles} from './styles';

interface Props {
  metadata?: Nullable<PostMetadata>;
}

export function SharedPost({metadata}: Props) {
  if (!metadata) return null;

  return (
    <View pointerEvents="none">
      <SharedPostComponent
        metadata={metadata}
        withFooter={false}
        style={styles.sharedPost}
      />
    </View>
  );
}
