|
|
@ -1,4 +1,11 @@ |
|
|
|
import { View, Text, Image, Appearance, Platform, Pressable } from "react-native"; |
|
|
|
import { |
|
|
|
|
|
|
|
View, |
|
|
|
|
|
|
|
Text, |
|
|
|
|
|
|
|
Image, |
|
|
|
|
|
|
|
Appearance, |
|
|
|
|
|
|
|
Platform, |
|
|
|
|
|
|
|
Pressable, |
|
|
|
|
|
|
|
} from "react-native"; |
|
|
|
import React from "react"; |
|
|
|
import React from "react"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import Svg, { Path } from "react-native-svg"; |
|
|
|
import Svg, { Path } from "react-native-svg"; |
|
|
@ -21,30 +28,26 @@ const User = ({ user }) => { |
|
|
|
)} |
|
|
|
)} |
|
|
|
onPress={() => setDropdown(!dropdown)} |
|
|
|
onPress={() => setDropdown(!dropdown)} |
|
|
|
> |
|
|
|
> |
|
|
|
<View |
|
|
|
<View style={tw(`flex items-center flex-row-reverse`)}> |
|
|
|
style={tw( |
|
|
|
{user?.picFileIds ? ( |
|
|
|
`flex items-center flex-row-reverse` |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{user?.picFileId ? ( |
|
|
|
|
|
|
|
<Image |
|
|
|
<Image |
|
|
|
source={{ uri: "https://dnvn.ir/api/v1/" + user.picFileId }} |
|
|
|
source={{ uri: "https://dnvn.ir/api/v1/" + user.picFileIds }} |
|
|
|
style={[tw("rounded-full"), { width: 70, height: 70 }]} |
|
|
|
style={[tw("rounded-full"), { width: 70, height: 70 }]} |
|
|
|
/> |
|
|
|
/> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("rounded-full bg-gray-400"), |
|
|
|
tw("rounded-full"), |
|
|
|
{ minWidth: 60, minHeight: 60, zIndex: 1 }, |
|
|
|
{ width: 60, height: 60, zIndex: 1, backgroundColor: "#ddd" }, |
|
|
|
]} |
|
|
|
]} |
|
|
|
></View> |
|
|
|
></View> |
|
|
|
)} |
|
|
|
)} |
|
|
|
<View style={tw(`flex flex-col ${ios ? "items-end" : ""}`)}> |
|
|
|
<View style={tw(`flex flex-col mr-1 ${ios ? "items-end" : ""}`)}> |
|
|
|
<Text |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
fontSize: fontSize.xl, |
|
|
|
fontSize: fontSize.lg, |
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "bold", |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{user?.firstName + " " + user?.lastName} |
|
|
|
{user?.firstName + " " + user?.lastName} |
|
|
@ -54,6 +57,7 @@ const User = ({ user }) => { |
|
|
|
fontSize: fontSize.tiny, |
|
|
|
fontSize: fontSize.tiny, |
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
fontFamily: "light", |
|
|
|
fontFamily: "light", |
|
|
|
|
|
|
|
marginTop: 3, |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{user?.cellphone} |
|
|
|
{user?.cellphone} |
|
|
@ -79,25 +83,28 @@ const User = ({ user }) => { |
|
|
|
> |
|
|
|
> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw( |
|
|
|
tw(`flex items-center w-full pb-3 mb-4 flex-row-reverse`), |
|
|
|
`flex items-center w-full pb-3 mb-4 flex-row-reverse` |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
borderBottomWidth: 1, |
|
|
|
borderBottomWidth: 1, |
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
}, |
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
> |
|
|
|
> |
|
|
|
{user?.picFileId ? ( |
|
|
|
{user?.picFileIds ? ( |
|
|
|
<Image |
|
|
|
<Image |
|
|
|
source={{ uri: "https://dnvn.ir/api/v1/" + user.picFileId }} |
|
|
|
source={{ uri: "https://dnvn.ir/api/v1/" + user.picFileIds }} |
|
|
|
style={[tw("rounded-full"), { width: 30, height: 30 }]} |
|
|
|
style={[tw("rounded-full"), { width: 30, height: 30 }]} |
|
|
|
/> |
|
|
|
/> |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw("rounded-full bg-gray-400"), |
|
|
|
tw("rounded-full"), |
|
|
|
{ minWidth: 30, minHeight: 30, zIndex: 1 }, |
|
|
|
{ |
|
|
|
|
|
|
|
minWidth: 30, |
|
|
|
|
|
|
|
minHeight: 30, |
|
|
|
|
|
|
|
zIndex: 1, |
|
|
|
|
|
|
|
backgroundColor: "#ddd", |
|
|
|
|
|
|
|
}, |
|
|
|
]} |
|
|
|
]} |
|
|
|
></View> |
|
|
|
></View> |
|
|
|
)} |
|
|
|
)} |
|
|
@ -105,7 +112,8 @@ const User = ({ user }) => { |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
fontSize: fontSize.base, |
|
|
|
fontSize: fontSize.base, |
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
color: Colors.theme1[colorScheme].gray20, |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "bold", |
|
|
|
|
|
|
|
marginRight: 5, |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{user?.firstName + " " + user?.lastName} |
|
|
|
{user?.firstName + " " + user?.lastName} |
|
|
@ -113,9 +121,7 @@ const User = ({ user }) => { |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={[ |
|
|
|
style={[ |
|
|
|
tw( |
|
|
|
tw(`flex items-center w-full pb-3 mb-3 flex-row-reverse`), |
|
|
|
`flex items-center w-full pb-3 mb-3 flex-row-reverse` |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
borderBottomWidth: 1, |
|
|
|
borderBottomWidth: 1, |
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|
borderColor: Colors.theme1[colorScheme].grayE3, |
|
|
|