import React from 'react';
import {ProfilePreviewType} from '../../types';
import ProfilePreview from '../profile/ProfilePreview';
import {StyleSheet, View} from 'react-native';
interface SearchResultsProps {
  results: Array<ProfilePreviewType>;
}
const SearchResults: React.FC<SearchResultsProps> = ({results}) => {
  return (
    <View>
      {results.map((profilePreview) => (
        <ProfilePreview
          style={styles.result}
          key={profilePreview.id}
          {...{profilePreview}}
          isComment={false}
        />
      ))}
    </View>
  );
};

const styles = StyleSheet.create({
  result: {
    marginVertical: 10,
  },
});

export default SearchResults;
