aboutsummaryrefslogtreecommitdiff
path: root/src/components/search/SearchResults.tsx
blob: 57db4167772d73a7ff4b0fce6d46963ab236bba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;