Skip to content

Commit

Permalink
style: update style and default image service
Browse files Browse the repository at this point in the history
  • Loading branch information
newarifrh committed Aug 27, 2024
1 parent 0455414 commit 573d8d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Binary file added public/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/components/service/FormService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,16 @@ const FormService = ({ serviceId, onSubmit }: FormServiceProps) => {
alt="Foto layanan"
src={image || ""}
loading="lazy"
fallback="https://via.placeholder.com/150"
fallback={"/default.png"}
/>
</Upload>
</Form.Item>
<p className="text-xs italic">
Foto layanan dapat berupa logo atau tangkapan layar layanan.
</p>
<p className="text-xs italic">
Khusus tangkapan layar gunakan ukuran 300 x 100.
</p>
<Form.Item name="hasLogo" valuePropName="checked">
<Checkbox>Apakah berupa logo?</Checkbox>
</Form.Item>
Expand Down
2 changes: 1 addition & 1 deletion src/components/service/ServiceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const ServiceItem = ({ service, onItemDeleted }: ServiceItemProps) => {
<div className="relative bg-white border rounded-md drop-shadow-sm gap-2 flex flex-col ">
{!service.hasLogo ? (
<Image
className="object-cover object-top"
className="object-cover"
height={100}
preview={false}
src={service.imageUrl}
Expand Down
2 changes: 1 addition & 1 deletion src/components/service/ServicesContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface ServicesContentProps {

const ServicesContent = ({ services, onItemDeleted }: ServicesContentProps) => {
return (
<div className="my-5 flex-1 grid gap-5 2xl:grid-cols-5 xl:grid-cols-4 lg:grid-cols-3 md:grid-cols-2 grid-cols-1 auto-rows-min">
<div className="my-5 flex-1 grid gap-5 2xl:grid-cols-5 xl:grid-cols-4 lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 auto-rows-min">
{services.map((item: Service, index: number) => (
<ServiceItem onItemDeleted={onItemDeleted} key={index} service={item} />
))}
Expand Down

0 comments on commit 573d8d6

Please sign in to comment.