base package
This commit is contained in:
+44
-47
@@ -1,10 +1,14 @@
|
||||
import Divider from '@/components/Divider'
|
||||
import { ArrowLeft, DocumentText } from 'iconsax-react'
|
||||
import { type FC } from 'react'
|
||||
import { useState, type FC } from 'react'
|
||||
import PdfIcon from '@/assets/images/PDF.svg'
|
||||
import Button from '@/components/Button'
|
||||
import Input from '@/components/Input'
|
||||
|
||||
const Home: FC = () => {
|
||||
|
||||
const [active, setActive] = useState<string>('')
|
||||
|
||||
return (
|
||||
<div className='mt-4 w-full'>
|
||||
<h1 className='text-lg font-light'>
|
||||
@@ -13,56 +17,15 @@ const Home: FC = () => {
|
||||
|
||||
<div className='mt-20 bg-white rounded-4xl p-10'>
|
||||
<div className='text-center'>
|
||||
سایز مورد نظر را انتخاب کنبد و یک کاتالوگ زیبا با ویرایشگر داناک بسازید
|
||||
سایز و نام مورد نظر را انتخاب کنبد و یک کاتالوگ زیبا با ویرایشگر داناک بسازید
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className='mt-8 flex justify-center gap-8'>
|
||||
<div className='w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center'>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
</div>
|
||||
|
||||
<div className='mt-3 text-center text-sm'>
|
||||
جزوه
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center'>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
</div>
|
||||
|
||||
<div className='mt-3 text-center text-sm'>
|
||||
بروشور
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center'>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
</div>
|
||||
|
||||
<div className='mt-3 text-center text-sm'>
|
||||
روزنامه
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center'>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
</div>
|
||||
|
||||
<div className='mt-3 text-center text-sm'>
|
||||
Letter
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center'>
|
||||
<div onClick={() => setActive('a4')} className={`
|
||||
w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center
|
||||
${active === 'a4' && 'border-black!'}
|
||||
`}>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
@@ -73,6 +36,40 @@ const Home: FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div onClick={() => setActive('a3')} className={`
|
||||
w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center
|
||||
${active === 'a3' && 'border-black!'}
|
||||
`}>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
</div>
|
||||
|
||||
<div className='mt-3 text-center text-sm'>
|
||||
A3
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div onClick={() => setActive('a5')} className={`
|
||||
w-[160px] h-[166px] rounded-[20px] border border-border flex items-center justify-center
|
||||
${active === 'a5' && 'border-black!'}
|
||||
`}>
|
||||
<div>
|
||||
<div className='size-[94px] bg-[#EEF0F7] rounded flex justify-center items-center'>
|
||||
<DocumentText size={24} color='black' />
|
||||
</div>
|
||||
|
||||
<div className='mt-3 text-center text-sm'>
|
||||
A5
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='mt-5'>
|
||||
<Input
|
||||
label='نام کاتالوگ'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='flex justify-center'>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as api from "../service/HomeService";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
|
||||
export const useHomeData = () => {
|
||||
return useMutation({
|
||||
mutationFn: api.createCatalog,
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
import axios from "@/config/axios";
|
||||
import type { CreateCatalogParamsType } from "../types/Types";
|
||||
|
||||
export const createCatalog = async (params: CreateCatalogParamsType) => {
|
||||
const { data } = await axios.post("/catalogs", params);
|
||||
return data;
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
export type CreateCatalogParamsType = {
|
||||
name: string;
|
||||
size: string;
|
||||
};
|
||||
Reference in New Issue
Block a user