@@ -15,8 +15,11 @@ import {PlusIcon} from '@heroicons/react/solid'
1515import { EditablePhotoGrid } from './widgets/editable-photo-grid'
1616import { AddPhotosWidget } from './widgets/add-photos'
1717
18- export default function ProfileCarousel ( props : { profile : Profile } ) {
19- const { profile} = props
18+ export default function ProfileCarousel ( props : {
19+ profile : Profile ,
20+ refreshProfile : ( ) => void ,
21+ } ) {
22+ const { profile, refreshProfile} = props
2023 const photoNums = profile . photo_urls ? profile . photo_urls . length : 0
2124
2225 const [ lightboxUrl , setLightboxUrl ] = useState ( '' )
@@ -36,27 +39,28 @@ export default function ProfileCarousel(props: { profile: Profile }) {
3639 photo_urls : photoUrls ,
3740 } )
3841 setIsEditMode ( false )
42+ refreshProfile ( )
3943 }
4044
4145 if ( ! currentUser && profile . visibility !== 'public' ) {
4246 return (
4347 < Carousel >
4448 { profile . pinned_url && (
45- < div className = "h-80 w-[250px ] flex-none snap-start" >
49+ < div className = "h-[300px] w-[300px ] flex-none snap-start" >
4650 < Image
4751 priority = { true }
4852 src = { profile . pinned_url }
49- height = { 360 }
50- width = { 240 }
51- sizes = "(max-width: 640px) 100vw, 240px "
53+ height = { 300 }
54+ width = { 300 }
55+ sizes = "(max-width: 640px) 100vw, 300px "
5256 alt = ""
5357 className = "h-full cursor-pointer rounded object-cover"
5458 />
5559 </ div >
5660 ) }
5761 { photoNums > 0 && (
5862 < Col
59- className = "bg-canvas-100 dark:bg-canvas-0 text-ink-500 relative h-80 w-[250px ] flex-none items-center rounded text-6xl " >
63+ className = "bg-canvas-100 dark:bg-canvas-0 text-ink-500 relative h-[300px] w-[300px ] flex-none items-center rounded text-6xl " >
6064 < Col className = " m-auto items-center gap-1" >
6165 < div className = "select-none font-semibold" > +{ photoNums } </ div >
6266 < SignUpButton
@@ -149,13 +153,13 @@ export default function ProfileCarousel(props: { profile: Profile }) {
149153 ) : (
150154 < Carousel >
151155 { buildArray ( profile . pinned_url , profile . photo_urls ) . map ( ( url , i ) => (
152- < div key = { url } className = "h-80 w-[250px ] flex-none snap-start" >
156+ < div key = { url } className = "h-[300px] w-[300px ] flex-none snap-start" >
153157 < Image
154158 priority = { i < 3 }
155159 src = { url }
156- height = { 360 }
157- width = { 240 }
158- sizes = "(max-width: 640px) 100vw, 240px "
160+ height = { 300 }
161+ width = { 300 }
162+ sizes = "(max-width: 640px) 100vw, 300px "
159163 alt = ""
160164 className = "h-full cursor-pointer rounded object-cover"
161165 onClick = { ( ) => {
@@ -167,7 +171,7 @@ export default function ProfileCarousel(props: { profile: Profile }) {
167171 ) ) }
168172 { isCurrentUser && ( profile . photo_urls ?. length ?? 0 ) > 1 && (
169173 < button
170- className = "bg-ink-200 text-ink-0 group flex h-80 w-[250px ] flex-none cursor-pointer snap-start items-center justify-center rounded ease-in-out"
174+ className = "bg-ink-200 text-ink-0 group flex h-[300px] w-[300px ] flex-none cursor-pointer snap-start items-center justify-center rounded ease-in-out"
171175 onClick = { ( ) => setAddPhotosOpen ( true ) }
172176 >
173177 < PlusIcon className = "w-20 transition-all group-hover:w-24" />
0 commit comments