Skip to content

Commit

Permalink
fix: fix navbar padding and fix price format
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrinasalm committed Nov 28, 2024
1 parent 087b3a3 commit bae42a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion resources/js/Layouts/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Navbar() {

return (
<nav className="border-b border-gray-100 bg-white">
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div className="w-full px-8 md:px-20">
<div className="flex h-16 justify-between">
<div className="flex">
<div className="flex shrink-0 items-center">
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Product/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Badge from "@/Components/Badge";
import ButtonLink from "@/Components/ButtonLink";
import Typography from "@/Components/Typography";
import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
import { cn } from "@/Lib/utils";
import { cn, numberToCurrency } from "@/Lib/utils";
import { CategoryType } from "@/types/entities/category";
import { ProductType } from "@/types/entities/product";
import { Link, usePage } from "@inertiajs/react";
Expand Down Expand Up @@ -133,7 +133,7 @@ const ProductIndex = ({
{p.description}
</Typography>
<Typography variant="s1" className="">
Rp{p.price}
{numberToCurrency(p.price)}
</Typography>
<Typography variant="b1">Stock: {p.stock}</Typography>
<div className="flex gap-2 items-center w-full">
Expand Down
7 changes: 5 additions & 2 deletions resources/js/Pages/Product/Show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Input from "@/Components/Forms/Input";
import IconButton from "@/Components/IconButton";
import Typography from "@/Components/Typography";
import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
import { numberToCurrency } from "@/Lib/utils";
import { ProductType } from "@/types/entities/product";
import {
Head,
Expand Down Expand Up @@ -72,7 +73,7 @@ export default function Show({ product }: { product: ProductType }) {
<Head title="Detail Product" />
<div className="px-10 md:px-10 py-8">
<div>
<ButtonLink href="/" leftIcon={ArrowLeft}>
<ButtonLink href="/product" leftIcon={ArrowLeft}>
Back
</ButtonLink>
</div>
Expand All @@ -92,7 +93,9 @@ export default function Show({ product }: { product: ProductType }) {
</Typography>
</div>
<div className="w-full">
<Typography variant="s1">Rp{product.price}</Typography>
<Typography variant="s1">
{numberToCurrency(product.price)}
</Typography>
</div>
<div className="w-full">
<Typography variant="b1" className="text-neutral-400">
Expand Down

0 comments on commit bae42a7

Please sign in to comment.