made backup your first photo centered
This commit is contained in:
parent
ced850317c
commit
6e26dc1792
|
@ -456,11 +456,26 @@ export default function Gallery(props: Props) {
|
|||
/>
|
||||
<UploadButton openFileUploader={props.openFileUploader} />
|
||||
{!isFirstLoad && data.length == 0 ? (
|
||||
<Jumbotron>
|
||||
<Button variant="outline-success" onClick={props.openFileUploader} style={{ paddingLeft: '32px', paddingRight: '32px', paddingTop: '12px', paddingBottom: '12px' }}>
|
||||
<div
|
||||
style={{
|
||||
height: '60%',
|
||||
display: 'grid',
|
||||
placeItems: 'center',
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
variant="outline-success"
|
||||
onClick={props.openFileUploader}
|
||||
style={{
|
||||
paddingLeft: '32px',
|
||||
paddingRight: '32px',
|
||||
paddingTop: '12px',
|
||||
paddingBottom: '12px',
|
||||
}}
|
||||
>
|
||||
{constants.UPLOAD_FIRST_PHOTO}
|
||||
</Button>
|
||||
</Jumbotron>
|
||||
</div>
|
||||
) : filteredData.length ? (
|
||||
<Container>
|
||||
<AutoSizer>
|
||||
|
@ -507,13 +522,13 @@ export default function Gallery(props: Props) {
|
|||
)
|
||||
? 'Today'
|
||||
: isSameDay(
|
||||
new Date(currentDate),
|
||||
new Date(Date.now() - A_DAY)
|
||||
)
|
||||
? 'Yesterday'
|
||||
: dateTimeFormat.format(
|
||||
currentDate
|
||||
),
|
||||
new Date(currentDate),
|
||||
new Date(Date.now() - A_DAY)
|
||||
)
|
||||
? 'Yesterday'
|
||||
: dateTimeFormat.format(
|
||||
currentDate
|
||||
),
|
||||
});
|
||||
timeStampList.push({
|
||||
itemType: ITEM_TYPE.TILE,
|
||||
|
@ -544,7 +559,7 @@ export default function Gallery(props: Props) {
|
|||
<List
|
||||
itemSize={(index) =>
|
||||
timeStampList[index].itemType ===
|
||||
ITEM_TYPE.TIME
|
||||
ITEM_TYPE.TIME
|
||||
? DATE_CONTAINER_HEIGHT
|
||||
: IMAGE_CONTAINER_HEIGHT
|
||||
}
|
||||
|
@ -561,14 +576,14 @@ export default function Gallery(props: Props) {
|
|||
columns={
|
||||
timeStampList[index]
|
||||
.itemType ===
|
||||
ITEM_TYPE.TIME
|
||||
ITEM_TYPE.TIME
|
||||
? 1
|
||||
: columns
|
||||
}
|
||||
>
|
||||
{timeStampList[index]
|
||||
.itemType ===
|
||||
ITEM_TYPE.TIME ? (
|
||||
ITEM_TYPE.TIME ? (
|
||||
<DateContainer>
|
||||
{
|
||||
timeStampList[
|
||||
|
@ -587,7 +602,7 @@ export default function Gallery(props: Props) {
|
|||
index
|
||||
]
|
||||
.itemStartIndex +
|
||||
idx
|
||||
idx
|
||||
);
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue