Skip to content

Commit

Permalink
Merge pull request #276 from Build-Squad/ENG-217-Business-Instagram-P…
Browse files Browse the repository at this point in the history
…rofile-Image

Business Profile Image if X account is connected
  • Loading branch information
varsha1305nav authored Mar 27, 2024
2 parents 502ee02 + f6156bf commit 684e2f6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
30 changes: 21 additions & 9 deletions src/ui/app/business/profile-preview/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,27 @@ export default function BusinessProfilePreview({ params }: Props) {
alignItems: "center",
}}
>
<Avatar
alt={businessDetails?.business_name}
src={businessDetails?.business_name}
sx={{
width: 138,
height: 138,
bgcolor: stringToColor(user?.username ?? ""),
}}
/>
{user?.twitter_account?.profile_image_url ? (
<Avatar
alt={"Business Account Image"}
src={user?.twitter_account?.profile_image_url}
sx={{
width: 138,
height: 138,
}}
/>
) : (
<Avatar
alt={businessDetails?.business_name}
src={businessDetails?.business_name}
sx={{
width: 138,
height: 138,
bgcolor: stringToColor(user?.username ?? ""),
}}
/>
)}

<Typography variant="h6" fontWeight={"bold"} sx={{ mt: 2 }}>
{!businessDetails?.business_name ||
businessDetails?.business_name == "" ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const ConnectXComponent = () => {
(window.location.href = `${BACKEND_URL}auth-twitter-user/business_owner/connect`)
}
>
Login to X
Connect with X
</Button>
</Box>
</>
Expand Down

0 comments on commit 684e2f6

Please sign in to comment.