|
@@ -33,6 +33,12 @@ export default function AddServicePage() {
|
|
|
setLoading(true)
|
|
setLoading(true)
|
|
|
setError('')
|
|
setError('')
|
|
|
|
|
|
|
|
|
|
+ if (!description.trim()) {
|
|
|
|
|
+ setError('Укажите описание')
|
|
|
|
|
+ setLoading(false)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
const portfolioImages: string[] = []
|
|
const portfolioImages: string[] = []
|
|
|
|
|
|
|
@@ -93,11 +99,12 @@ export default function AddServicePage() {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<div>
|
|
|
- <label className="mb-1 block text-sm text-white/60">Описание</label>
|
|
|
|
|
|
|
+ <label className="mb-1 block text-sm text-white/60">Описание *</label>
|
|
|
<textarea
|
|
<textarea
|
|
|
value={description}
|
|
value={description}
|
|
|
onChange={(e) => setDescription(e.target.value)}
|
|
onChange={(e) => setDescription(e.target.value)}
|
|
|
rows={4}
|
|
rows={4}
|
|
|
|
|
+ required
|
|
|
className="w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white outline-none focus:border-green-500"
|
|
className="w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white outline-none focus:border-green-500"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|