Skip to content

Commit 72a4fb0

Browse files
committed
Merge branch 'steven_fixes1'
2 parents a35b173 + 74817b7 commit 72a4fb0

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

mhd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit c41b8cd7efba109eec8ab7a6724df464b83b3f35

src/components/Cart.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ export function Cart({
7777
Clear All
7878
</button>
7979
{cart.length === 0 ? (
80-
<Button onClick={() => toast.error("Cart is empty")}>
81-
Export To PDF
80+
<Button
81+
className="min-w-32"
82+
onClick={() => toast.error("Cart is empty")}
83+
>
84+
Export All
8285
</Button>
8386
) : (
8487
<AlertDialog>
@@ -87,7 +90,7 @@ export function Cart({
8790
{isExporting ? (
8891
<Loader2 className="h-4 w-4 animate-spin" />
8992
) : (
90-
"Export To PDF"
93+
"Export All"
9194
)}
9295
</Button>
9396
</AlertDialogTrigger>

src/components/YearInput.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function YearInput({ year, setYear }: YearInputProps) {
4040
const hasData = !!currYear && !!yearsWithData?.has(currYear);
4141

4242
const handleYearInput = (e: React.ChangeEvent<HTMLInputElement>) => {
43-
const value = e.target.value;
43+
const value = e.target.value.replace(/\D/g, "");
4444
if (value.length > 4) return;
4545
setYearStr(value);
4646
if (value.length === 4) setYear(Number(value));
@@ -88,7 +88,8 @@ export default function YearInput({ year, setYear }: YearInputProps) {
8888
/>
8989
)}
9090
<Input
91-
type="number"
91+
type="text"
92+
inputMode="numeric"
9293
id="year"
9394
name="Year"
9495
value={yearStr}

src/components/ui/alert-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const AlertDialogContent = React.forwardRef<
3636
<AlertDialogPrimitive.Content
3737
ref={ref}
3838
className={cn(
39-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
39+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
4040
className,
4141
)}
4242
{...props}

0 commit comments

Comments
 (0)