1
+ import * as S from "@chakra-ui/react" ;
1
2
import React , { useState } from "react" ;
2
3
import { connect } from "react-redux" ;
4
+ import { reallyGetAllPosts } from "../../../actions/getPostAction" ;
3
5
import {
4
- uploadProfilePhoto ,
6
+ cleanProfile ,
7
+ editProfile ,
8
+ getThatProfileE ,
5
9
loadProfile ,
6
10
toggleBackdrop ,
7
- editProfile ,
8
- cleanProfile ,
11
+ uploadProfilePhoto ,
9
12
} from "../../../actions/profileAction" ;
10
- import * as S from "@chakra-ui/react" ;
11
13
import isEmpty from "../../../utils/isEmpty" ;
12
14
import {
15
+ addProfile ,
13
16
onFieldChange ,
14
17
saveProfileBtn ,
15
- addProfile ,
16
18
useLoadProfile ,
17
19
useSetProfileInSettings ,
18
20
useShowToastOnSuccessfulUpdating ,
19
21
} from "./profile-functions" ;
20
- import { reallyGetAllPosts } from "../../../actions/getPostAction" ;
21
- import { getThatProfileE } from "../../../actions/profileAction" ;
22
22
23
23
const Profile = ( {
24
24
profile,
@@ -49,6 +49,7 @@ const Profile = ({
49
49
let name = "" ;
50
50
let bio = "" ;
51
51
let country = "" ;
52
+
52
53
if ( user . name === "user" && profile . profile . user ) {
53
54
imgURL = profile . profile . image ;
54
55
name = profile . profile . user . name ;
@@ -68,6 +69,7 @@ const Profile = ({
68
69
< S . Flex py = "2rem" >
69
70
< S . Flex >
70
71
< S . Image
72
+ objectFit = "cover"
71
73
src = { imgURL }
72
74
fallbackSrc = "https://i.ibb.co/RBT25fY/default-fallback-image.png"
73
75
style = { { width : "150px" , height : "150px" , borderRadius : "100%" } }
@@ -104,13 +106,7 @@ const Profile = ({
104
106
</ S . Flex >
105
107
< S . Flex >
106
108
{ user . name === "user" && (
107
- < S . Button
108
- h = "30px"
109
- onClick = { onOpen }
110
- my = "5px"
111
- fontWeight = "normal"
112
- colorScheme = "blackAlpha"
113
- >
109
+ < S . Button h = "30px" onClick = { onOpen } my = "5px" fontWeight = "normal" >
114
110
Edit Profile
115
111
</ S . Button >
116
112
) }
@@ -138,6 +134,7 @@ const Profile = ({
138
134
} }
139
135
mb = "5px"
140
136
alt = "user"
137
+ objectFit = "cover"
141
138
/>
142
139
< S . FormLabel > Profile Image</ S . FormLabel >
143
140
< S . Input
0 commit comments