blob: a39019931c7deba7cbadc81ac64caf96473fa6fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
'use client';
import { Button } from '@/components/ui';
import {
UploadMenu,
FileDropzone,
TagsInput,
SourceInput,
Switches,
} from '@/components/upload';
import { PUBLISH_DISCLAIMER } from '@/lib/consts';
export default function Upload() {
return (
<div className="flex justify-between w-full">
<UploadMenu />
<form
className="flex flex-col grow max-w-[900px] gap-5"
onSubmit={(e) => {
console.log('SUBMIT');
e.preventDefault();
const formData = new FormData(e.currentTarget);
const data: any = Object.fromEntries(formData.entries());
console.log(data.files);
}}
>
<FileDropzone />
<TagsInput />
<SourceInput />
<Switches />
<span className="text-center text-sm">
{PUBLISH_DISCLAIMER}
</span>
<Button>Опубликовать</Button>
</form>
</div>
);
}
|