feat: fixes and formatter
This commit is contained in:
@@ -1,39 +1,35 @@
|
||||
import React from "react";
|
||||
import { Text, useWindowDimensions, View } from "react-native";
|
||||
import { Image } from "expo-image";
|
||||
import { BlurView } from "expo-blur";
|
||||
import { gutters, Palette } from "../../../styles";
|
||||
import { FONT_FAMILY } from "../../../styles/Fonts";
|
||||
import FontAwesome from "@expo/vector-icons/FontAwesome";
|
||||
import palette from "../../../styles/Palette";
|
||||
import React from 'react'
|
||||
import { Text, useWindowDimensions, View } from 'react-native'
|
||||
import { Image } from 'expo-image'
|
||||
import { BlurView } from 'expo-blur'
|
||||
import { gutters, Palette } from '../../../styles'
|
||||
import { FONT_FAMILY } from '../../../styles/Fonts'
|
||||
import FontAwesome from '@expo/vector-icons/FontAwesome'
|
||||
import palette from '../../../styles/Palette'
|
||||
|
||||
export default function PersonaCard({ item, index, isLock = false, height }) {
|
||||
const isImageOnLeft = index % 2 === 0;
|
||||
const { height: windowHeight } = useWindowDimensions();
|
||||
const cardHeight = Math.max(height ?? windowHeight, 1);
|
||||
const isImageOnLeft = index % 2 === 0
|
||||
const { height: windowHeight } = useWindowDimensions()
|
||||
const cardHeight = Math.max(height ?? windowHeight, 1)
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: cardHeight,
|
||||
width: "100%",
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
borderRadius: 10,
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
width: "100%",
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
source={item.image}
|
||||
style={{ height: 190, width: "100%" }}
|
||||
contentFit="contain"
|
||||
/>
|
||||
<Image source={item.image} style={{ height: 190, width: '100%' }} contentFit="contain" />
|
||||
<BlurView
|
||||
intensity={30}
|
||||
tint="dark"
|
||||
@@ -43,8 +39,8 @@ export default function PersonaCard({ item, index, isLock = false, height }) {
|
||||
borderTopRightRadius: isImageOnLeft ? 0 : 20,
|
||||
paddingVertical: 20,
|
||||
paddingHorizontal: gutters,
|
||||
overflow: "hidden",
|
||||
width: "100%",
|
||||
overflow: 'hidden',
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
@@ -71,7 +67,7 @@ export default function PersonaCard({ item, index, isLock = false, height }) {
|
||||
<View
|
||||
pointerEvents="none"
|
||||
style={{
|
||||
position: "absolute",
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
@@ -79,9 +75,9 @@ export default function PersonaCard({ item, index, isLock = false, height }) {
|
||||
borderRadius: 20,
|
||||
borderTopLeftRadius: isImageOnLeft ? 20 : 0,
|
||||
borderTopRightRadius: isImageOnLeft ? 0 : 20,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundColor: "rgba(0,0,0,0.2)",
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: 'rgba(0,0,0,0.2)',
|
||||
}}
|
||||
>
|
||||
<View
|
||||
@@ -89,9 +85,9 @@ export default function PersonaCard({ item, index, isLock = false, height }) {
|
||||
width: 36,
|
||||
height: 36,
|
||||
borderRadius: 18,
|
||||
backgroundColor: "rgba(0,0,0,0.4)",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
backgroundColor: 'rgba(0,0,0,0.4)',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}
|
||||
>
|
||||
<FontAwesome name="lock" size={24} color={palette.primary} />
|
||||
@@ -101,5 +97,5 @@ export default function PersonaCard({ item, index, isLock = false, height }) {
|
||||
</BlurView>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import React from "react";
|
||||
import { Text, useWindowDimensions, View, StyleSheet } from "react-native";
|
||||
import { Image } from "expo-image";
|
||||
import { BlurView } from "expo-blur";
|
||||
import { Palette } from "../../../styles";
|
||||
import { FONT_FAMILY } from "../../../styles/Fonts";
|
||||
import FontAwesome from "@expo/vector-icons/FontAwesome";
|
||||
import palette from "../../../styles/Palette";
|
||||
import React from 'react'
|
||||
import { Text, useWindowDimensions, View, StyleSheet } from 'react-native'
|
||||
import { Image } from 'expo-image'
|
||||
import { BlurView } from 'expo-blur'
|
||||
import { Palette } from '../../../styles'
|
||||
import { FONT_FAMILY } from '../../../styles/Fonts'
|
||||
import FontAwesome from '@expo/vector-icons/FontAwesome'
|
||||
import palette from '../../../styles/Palette'
|
||||
|
||||
export default function PersonaCard({ item, index, isLock = true }) {
|
||||
const isImageOnLeft = index % 2 === 0;
|
||||
const { height: windowHeight } = useWindowDimensions();
|
||||
const isImageOnLeft = index % 2 === 0
|
||||
const { height: windowHeight } = useWindowDimensions()
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
width: "100%",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
width: '100%',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
height: windowHeight,
|
||||
}}
|
||||
>
|
||||
@@ -24,21 +24,15 @@ export default function PersonaCard({ item, index, isLock = true }) {
|
||||
style={{
|
||||
padding: 10,
|
||||
borderRadius: 10,
|
||||
backgroundColor: isLock
|
||||
? "rgba(0, 0, 0, 0.2)"
|
||||
: "rgba(0, 0, 0, 0.05)",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
width: "90%",
|
||||
height: "30%",
|
||||
flexDirection: isImageOnLeft ? "row" : "row-reverse",
|
||||
backgroundColor: isLock ? 'rgba(0, 0, 0, 0.2)' : 'rgba(0, 0, 0, 0.05)',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
width: '90%',
|
||||
height: '30%',
|
||||
flexDirection: isImageOnLeft ? 'row' : 'row-reverse',
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
source={item.image}
|
||||
style={{ height: 250, width: 400 }}
|
||||
contentFit="contain"
|
||||
/>
|
||||
<Image source={item.image} style={{ height: 250, width: 400 }} contentFit="contain" />
|
||||
<BlurView
|
||||
intensity={30}
|
||||
tint="dark"
|
||||
@@ -50,14 +44,14 @@ export default function PersonaCard({ item, index, isLock = true }) {
|
||||
borderBottomRightRadius: isImageOnLeft ? 20 : 0,
|
||||
paddingHorizontal: 18,
|
||||
paddingVertical: 16,
|
||||
overflow: "hidden",
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
{isLock && (
|
||||
<View
|
||||
style={{
|
||||
...StyleSheet.absoluteFillObject,
|
||||
backgroundColor: "rgba(0,0,0,0.6)",
|
||||
backgroundColor: 'rgba(0,0,0,0.6)',
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -80,7 +74,7 @@ export default function PersonaCard({ item, index, isLock = true }) {
|
||||
style={{
|
||||
fontSize: 14,
|
||||
lineHeight: 20,
|
||||
color: "rgba(255, 255, 255, 0.7)",
|
||||
color: 'rgba(255, 255, 255, 0.7)',
|
||||
fontFamily: FONT_FAMILY.InterRegular,
|
||||
}}
|
||||
>
|
||||
@@ -90,14 +84,14 @@ export default function PersonaCard({ item, index, isLock = true }) {
|
||||
<View
|
||||
pointerEvents="none"
|
||||
style={{
|
||||
position: "absolute",
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
borderRadius: 20,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<View
|
||||
@@ -105,9 +99,9 @@ export default function PersonaCard({ item, index, isLock = true }) {
|
||||
width: 36,
|
||||
height: 36,
|
||||
borderRadius: 18,
|
||||
backgroundColor: "rgba(0,0,0,0.4)",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
backgroundColor: 'rgba(0,0,0,0.4)',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
}}
|
||||
>
|
||||
<FontAwesome name="lock" size={24} color={palette.primary} />
|
||||
@@ -118,5 +112,5 @@ export default function PersonaCard({ item, index, isLock = true }) {
|
||||
</BlurView>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user