fix(23): resolve UAT issues — duplicate header, image position, catalog submit style
- Remove duplicate back arrow/header from ManualEntryForm (overlay already shows it) - Move ImageUpload to top of ManualEntryForm for visual cohesion - Change "Submit to Catalog?" from text link to checkbox-style toggle Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { ArrowLeft } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useCategories } from "../hooks/useCategories";
|
||||
import { useCreateItem } from "../hooks/useItems";
|
||||
@@ -8,13 +7,11 @@ import { ImageUpload } from "./ImageUpload";
|
||||
interface ManualEntryFormProps {
|
||||
initialName?: string;
|
||||
onSuccess: (itemName: string) => void;
|
||||
onBack: () => void;
|
||||
}
|
||||
|
||||
export function ManualEntryForm({
|
||||
initialName,
|
||||
onSuccess,
|
||||
onBack,
|
||||
}: ManualEntryFormProps) {
|
||||
const { data: categories } = useCategories();
|
||||
const createItem = useCreateItem();
|
||||
@@ -78,19 +75,15 @@ export function ManualEntryForm({
|
||||
|
||||
return (
|
||||
<div className="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
||||
{/* Back arrow row */}
|
||||
<div className="flex items-center gap-1.5 mb-4">
|
||||
<button
|
||||
type="button"
|
||||
onClick={onBack}
|
||||
className="p-0.5 text-gray-400 hover:text-gray-600 transition-colors"
|
||||
>
|
||||
<ArrowLeft className="w-4 h-4" />
|
||||
</button>
|
||||
<p className="text-xs font-medium text-gray-400">Add Manually</p>
|
||||
</div>
|
||||
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
{/* Image upload — hero position */}
|
||||
<div>
|
||||
<ImageUpload
|
||||
value={imageFilename}
|
||||
onChange={(filename) => setImageFilename(filename)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Name */}
|
||||
<div>
|
||||
<label
|
||||
@@ -217,17 +210,6 @@ export function ManualEntryForm({
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Image upload */}
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||
Image
|
||||
</label>
|
||||
<ImageUpload
|
||||
value={imageFilename}
|
||||
onChange={(filename) => setImageFilename(filename)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Error */}
|
||||
{error && <p className="text-sm text-red-600">{error}</p>}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user