Skip to content

Commit c2802cf

Browse files
fixed dashboard styles
1 parent 72de832 commit c2802cf

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

client/src/components/pages/DashboardHome.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { Box, Flex, Text } from "@chakra-ui/react";
12
import React from "react";
2-
import UserPost from "./user-post/UserPost";
3-
import Profile from "./profile/Profile";
4-
import { Flex, Box, Text } from "@chakra-ui/react";
53
import DashboardSideBar from "./DashboardSideBar";
4+
import Profile from "./profile/Profile";
5+
import UserPost from "./user-post/UserPost";
66

77
const DashboardHome = ({ routing, user }) => {
88
return (

client/src/components/pages/profile/Profile.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1+
import * as S from "@chakra-ui/react";
12
import React, { useState } from "react";
23
import { connect } from "react-redux";
4+
import { reallyGetAllPosts } from "../../../actions/getPostAction";
35
import {
4-
uploadProfilePhoto,
6+
cleanProfile,
7+
editProfile,
8+
getThatProfileE,
59
loadProfile,
610
toggleBackdrop,
7-
editProfile,
8-
cleanProfile,
11+
uploadProfilePhoto,
912
} from "../../../actions/profileAction";
10-
import * as S from "@chakra-ui/react";
1113
import isEmpty from "../../../utils/isEmpty";
1214
import {
15+
addProfile,
1316
onFieldChange,
1417
saveProfileBtn,
15-
addProfile,
1618
useLoadProfile,
1719
useSetProfileInSettings,
1820
useShowToastOnSuccessfulUpdating,
1921
} from "./profile-functions";
20-
import { reallyGetAllPosts } from "../../../actions/getPostAction";
21-
import { getThatProfileE } from "../../../actions/profileAction";
2222

2323
const Profile = ({
2424
profile,
@@ -49,6 +49,7 @@ const Profile = ({
4949
let name = "";
5050
let bio = "";
5151
let country = "";
52+
5253
if (user.name === "user" && profile.profile.user) {
5354
imgURL = profile.profile.image;
5455
name = profile.profile.user.name;
@@ -68,6 +69,7 @@ const Profile = ({
6869
<S.Flex py="2rem">
6970
<S.Flex>
7071
<S.Image
72+
objectFit="cover"
7173
src={imgURL}
7274
fallbackSrc="https://i.ibb.co/RBT25fY/default-fallback-image.png"
7375
style={{ width: "150px", height: "150px", borderRadius: "100%" }}
@@ -104,13 +106,7 @@ const Profile = ({
104106
</S.Flex>
105107
<S.Flex>
106108
{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">
114110
Edit Profile
115111
</S.Button>
116112
)}
@@ -138,6 +134,7 @@ const Profile = ({
138134
}}
139135
mb="5px"
140136
alt="user"
137+
objectFit="cover"
141138
/>
142139
<S.FormLabel>Profile Image</S.FormLabel>
143140
<S.Input

0 commit comments

Comments
 (0)