mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
fixing error message when passwords do not match / fixing placeholder image
This commit is contained in:
@@ -47,7 +47,7 @@ export default function UserTable({ user = [], onUserRemoval, onUserEdit } = {})
|
||||
{
|
||||
title: 'Last login',
|
||||
dataIndex: 'lastLogin',
|
||||
render: (value) => format(value),
|
||||
render: (value) => (value == null ? '---' : format(value)),
|
||||
},
|
||||
{
|
||||
title: 'Jobs',
|
||||
|
||||
@@ -13,5 +13,3 @@ export function format(ts, showSeconds = true) {
|
||||
...(showSeconds ? { second: 'numeric' } : {}),
|
||||
}).format(ts);
|
||||
}
|
||||
|
||||
export const roundToHour = (ts) => Math.ceil(ts / (1000 * 60 * 60)) * (1000 * 60 * 60);
|
||||
|
||||
@@ -335,16 +335,12 @@ export default function ListingDetail() {
|
||||
|
||||
<Row>
|
||||
<Col span={24} lg={12}>
|
||||
<div className="listing-detail__image-container">
|
||||
<div
|
||||
className={`listing-detail__image-container${!listing.image_url ? ' listing-detail__image-container--placeholder' : ''}`}
|
||||
>
|
||||
<Image
|
||||
src={listing.image_url ?? no_image}
|
||||
fallback={
|
||||
<img
|
||||
src={no_image}
|
||||
alt="No image available"
|
||||
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||
/>
|
||||
}
|
||||
fallback={<img src={no_image} alt="No image available" />}
|
||||
style={{ width: '100%', height: '100%' }}
|
||||
preview={!!listing.image_url}
|
||||
/>
|
||||
|
||||
@@ -69,6 +69,13 @@
|
||||
object-fit: cover !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
&--placeholder {
|
||||
img,
|
||||
.semi-image-img {
|
||||
object-fit: contain !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__address-link {
|
||||
|
||||
@@ -59,7 +59,7 @@ const UserMutator = function UserMutator() {
|
||||
navigate('/users');
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
Toast.error(error.json.message);
|
||||
Toast.error(error.json.error);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user