diff --git a/components/CardEditorForm.js b/components/CardEditorForm.js new file mode 100644 index 0000000..d329ac8 --- /dev/null +++ b/components/CardEditorForm.js @@ -0,0 +1,390 @@ +/* eslint-disable @next/next/no-img-element -- External card image URLs; next/image migration is out of scope. */ + +const RARITY_OPTIONS = [ + 'common', 'uncommon', 'rare', 'mythic', 'legendary', + 'holographic', 'enchanted', 'super rare', 'ultra rare', +]; + +const GAME_OPTIONS = ['MTG', 'Pokemon', 'Lorcana']; + +const COLOR_OPTIONS = ['White', 'Blue', 'Black', 'Red', 'Green', 'Colorless']; + +export default function CardEditorForm({ + formData, + onInputChange, + onColorChange, + onSave, + saving, + message, +}) { + return ( + <> +
+ {formData.set_name} • {formData.game} +
++ {formData.rarity} • {formData.card_type} +
+ {formData.current_price && ( ++ ${parseFloat(formData.current_price).toFixed(2)} +
+ )} +- {formData.set_name} • {formData.game} -
-- {formData.rarity} • {formData.card_type} -
- {formData.current_price && ( -- ${parseFloat(formData.current_price).toFixed(2)} -
- )} -