mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-09 11:13:03 +00:00
scrollable photo list and fixed photo box
This commit is contained in:
23
src/App.tsx
23
src/App.tsx
@@ -505,11 +505,18 @@ function Home() {
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex">
|
||||
<div className="flex flex-col flex-1 ml-8">
|
||||
<div
|
||||
id={getTravelPhotoListId(location.id)}
|
||||
className="flex flex-col flex-1 ml-8 max-h-128 overflow-y-auto gap-1"
|
||||
>
|
||||
{locationPhotos[location.id].map(
|
||||
(photo, photoIndex) => (
|
||||
<Button
|
||||
key={photo}
|
||||
id={getTravelPhotoItemId(
|
||||
location.id,
|
||||
photoIndex,
|
||||
)}
|
||||
onClick={() => {
|
||||
const path = getTravelPhotoPath(
|
||||
location,
|
||||
@@ -541,6 +548,11 @@ function Home() {
|
||||
),
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
"flex-1 max-w-sm border flex items-center h-128 justify-center text-sm gap-4"
|
||||
}
|
||||
>
|
||||
{previewPhotoPath ? (
|
||||
<img
|
||||
className={"flex-1 max-w-sm"}
|
||||
@@ -548,16 +560,13 @@ function Home() {
|
||||
alt={"active-photo"}
|
||||
/>
|
||||
) : (
|
||||
<div
|
||||
className={
|
||||
"flex-1 max-w-sm border flex items-center justify-center text-sm gap-4"
|
||||
}
|
||||
>
|
||||
<span>
|
||||
<ImageDelete />
|
||||
No photo selected
|
||||
</div>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user