From a3f29af5d73951e618cde3f7a3f795bda1e7cdbe Mon Sep 17 00:00:00 2001 From: Antoine Garcia Date: Fri, 11 Jun 2021 12:43:10 +0200 Subject: [PATCH] (PC-9075) Replace skeleton by new custom made on Search page --- .../search/components/Placeholders.tsx | 68 +++++++------------ 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/src/features/search/components/Placeholders.tsx b/src/features/search/components/Placeholders.tsx index 09582dfcc9e..40d287599c0 100644 --- a/src/features/search/components/Placeholders.tsx +++ b/src/features/search/components/Placeholders.tsx @@ -1,68 +1,48 @@ import React from 'react' -import ContentLoader from 'react-content-loader/native' -import { Dimensions } from 'react-native' -import { G, Rect } from 'react-native-svg' +import { View } from 'react-native' import styled from 'styled-components/native' -import { getSpacing, Spacer, UniqueColors } from 'ui/theme' +import { SkeletonTile } from 'features/home/atoms/SkeletonTile' +import { getSpacing, Spacer } from 'ui/theme' const borderRadius = 4 -const { width: windowWidth } = Dimensions.get('window') const imageWidth = getSpacing(16) const imageHeight = getSpacing(24) // ratio 2/3 const BasePlaceholder = ({ height, width }: { height: number; width: number }) => ( - + ) + const TextPlaceholder = ({ width, height }: { width: number; height?: number }) => ( - + ) export const NumberOfResultsPlaceholder = () => ( - - - + ) -export const HitPlaceholder = () => { - const x = imageWidth + getSpacing(4) - return ( - - - - - - - - - - - - - - - - - - - - ) -} +export const HitPlaceholder = () => ( + + + + + + + + + + + + + + + +) const Container = styled.View({ marginHorizontal: getSpacing(6) }) const Row = styled.View({ flexDirection: 'row', alignItems: 'center' })