Rename shapes to semantic meanings
It looks like after all I do want to fork based on those.
This commit is contained in:
@@ -72,7 +72,7 @@ let ProfileHeaderShell = ({
|
||||
height: 1000,
|
||||
width: 1000,
|
||||
},
|
||||
shape: 'circle',
|
||||
type: 'circle-avi',
|
||||
},
|
||||
],
|
||||
index: 0,
|
||||
|
||||
@@ -24,5 +24,5 @@ export type ImageSource = {
|
||||
thumbRect: MeasuredDimensions | null
|
||||
alt?: string
|
||||
dimensions: Dimensions | null
|
||||
shape: 'circle' | 'rect' | 'rounded-rect'
|
||||
type: 'image' | 'circle-avi' | 'rect-avi'
|
||||
}
|
||||
|
||||
@@ -309,9 +309,9 @@ const ImageItem = ({
|
||||
width: SCREEN.width,
|
||||
height: imageAspect ? SCREEN.width / imageAspect : undefined,
|
||||
borderRadius:
|
||||
imageSrc.shape === 'circle'
|
||||
imageSrc.type === 'circle-avi'
|
||||
? SCREEN.width / 2
|
||||
: imageSrc.shape === 'rounded-rect'
|
||||
: imageSrc.type === 'rect-avi'
|
||||
? 20
|
||||
: 0,
|
||||
}}
|
||||
|
||||
@@ -138,9 +138,9 @@ const ImageItem = ({
|
||||
width: SCREEN.width,
|
||||
height: imageAspect ? SCREEN.width / imageAspect : undefined,
|
||||
borderRadius:
|
||||
imageSrc.shape === 'circle'
|
||||
imageSrc.type === 'circle-avi'
|
||||
? SCREEN.width / 2
|
||||
: imageSrc.shape === 'rounded-rect'
|
||||
: imageSrc.type === 'rect-avi'
|
||||
? 20
|
||||
: 0,
|
||||
}}
|
||||
|
||||
@@ -87,7 +87,7 @@ export function ProfileSubpageHeader({
|
||||
height: 1000,
|
||||
width: 1000,
|
||||
},
|
||||
shape: 'rounded-rect',
|
||||
type: 'rect-avi',
|
||||
},
|
||||
],
|
||||
index: 0,
|
||||
|
||||
@@ -155,7 +155,7 @@ export function PostEmbeds({
|
||||
images: items.map((item, i) => ({
|
||||
...item,
|
||||
thumbRect: thumbRects[i] ?? null,
|
||||
shape: 'rect',
|
||||
type: 'image',
|
||||
})),
|
||||
index,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user