Skip to content

Commit

Permalink
fix: Handle cases where the image on the user card overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cjeongmin committed May 30, 2024
1 parent 3556d16 commit 979c39d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/components/CircularProfileImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ import styled from 'styled-components';
import { CircularProgressBar } from './CircularProgressBar';

const styles = {
backgroundContainer: styled.div<{ $url: string }>`
backgroundContainer: styled.div`
position: absolute;
top: 0;
left: 0;
z-index: 0;
width: 100%;
height: 100%;
border-radius: 50%;
`,
background: styled.div<{ $url: string }>`
width: 100%;
height: 100%;
border-radius: 50%;
Expand Down Expand Up @@ -82,7 +91,9 @@ export function CircularProfileImage({
}) {
return (
<styles.container $diameter={diameter}>
<styles.backgroundContainer $url={url} />
<styles.backgroundContainer>
<styles.background $url={url} />
</styles.backgroundContainer>
{hideScore === false && (
<>
<styles.CircularProgressBar
Expand Down

0 comments on commit 979c39d

Please sign in to comment.