fix warnings from components
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
|
||||
import { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Select from '../../components/Select'
|
||||
import Input from '../../components/Input'
|
||||
import Td from '../../components/Td'
|
||||
import SwitchComponent from '../../components/Switch'
|
||||
import { TickSquare, More, TickCircle } from 'iconsax-react'
|
||||
import "quill/dist/quill.snow.css";
|
||||
import Button from '../../components/Button'
|
||||
const BlogCategory: FC = () => {
|
||||
const { t } = useTranslation('global')
|
||||
return (
|
||||
<div className='mt-4'>
|
||||
<div className='flex justify-start items-center'>
|
||||
<div>
|
||||
{t('blog.blog_category')}
|
||||
</div>
|
||||
</div>
|
||||
<div className='flex gap-6 xl:mt-8 mt-4'>
|
||||
<div className='flex-1'>
|
||||
<div className='flex items-end w-full justify-between'>
|
||||
<div className='w-[200px]'>
|
||||
<Select
|
||||
items={[
|
||||
{
|
||||
label: 'تست',
|
||||
value: 'active'
|
||||
}
|
||||
]}
|
||||
className='bg-white border'
|
||||
/>
|
||||
</div>
|
||||
<div className='xl:w-[300px] w-full'>
|
||||
<Input
|
||||
variant='search'
|
||||
placeholder={t('ads.search')}
|
||||
className='bg-white w-full'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className='bg-white min-h-[calc(100vh-245px)] mt-4 rounded-3xl'>
|
||||
<div className='relative overflow-x-auto rounded-3xl w-full'>
|
||||
<table className='w-full text-sm '>
|
||||
<thead className='thead'>
|
||||
<tr>
|
||||
<td className='w-[100px]'>
|
||||
|
||||
</td>
|
||||
<Td text={t('blog.number')} />
|
||||
<Td text={t('blog.blog_title')} />
|
||||
<Td text={t('blog.blog_Summary')} />
|
||||
<Td text={t('blog.category')} />
|
||||
<Td text={t('blog.shareDate')} />
|
||||
<Td text={t('blog.status')} />
|
||||
<Td text={''} />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr className='tr'>
|
||||
<td>
|
||||
<div className='flex justify-center'>
|
||||
<TickSquare size={20} color='black' variant='Bold' />
|
||||
</div>
|
||||
</td>
|
||||
<Td text={t('blog.number')} />
|
||||
<Td text={t('blog.blog_title')} />
|
||||
<Td text={t('blog.blog_Summary')} />
|
||||
<Td text={t('blog.category')} />
|
||||
<Td text={t('blog.shareDate')} />
|
||||
<Td text={t('')}>
|
||||
<SwitchComponent
|
||||
active={true}
|
||||
onChange={() => { }}
|
||||
/>
|
||||
</Td>
|
||||
<Td text={''}>
|
||||
<More size={20} color='black' className='rotate-90' />
|
||||
</Td>
|
||||
</tr>
|
||||
<tr className='tr'>
|
||||
<td>
|
||||
<div className='flex justify-center'>
|
||||
<TickSquare size={20} color='black' variant='Bold' />
|
||||
</div>
|
||||
</td>
|
||||
<Td text={t('blog.number')} />
|
||||
<Td text={t('blog.blog_title')} />
|
||||
<Td text={t('blog.blog_Summary')} />
|
||||
<Td text={t('blog.category')} />
|
||||
<Td text={t('blog.shareDate')} />
|
||||
<Td text={t('')}>
|
||||
<SwitchComponent
|
||||
active={true}
|
||||
onChange={() => { }}
|
||||
/>
|
||||
</Td>
|
||||
<Td text={''}>
|
||||
<More size={20} color='black' className='rotate-90' />
|
||||
</Td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='relative bg-white min-h-[calc(100vh-185px)] w-sidebar xl:block hidden py-10 px-5 h-fit rounded-3xl'>
|
||||
<p className='text-md'>{t('blog.add_category')}</p>
|
||||
<div className='text-sm flex items-center justify-between mt-4'>
|
||||
<p>
|
||||
{t('blog.category_status')}
|
||||
</p>
|
||||
<div className='flex gap-1 text-xs items-center text-description'>
|
||||
<div>
|
||||
{t('ads.deactive')}
|
||||
</div>
|
||||
<SwitchComponent
|
||||
active={false}
|
||||
onChange={() => { }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p className='mt-6 text-sm'>{t('blog.category_title')}</p>
|
||||
<div className='mt-6'>
|
||||
<Input className='-mt-4' />
|
||||
</div>
|
||||
<p className='mt-6 text-sm'>{t('blog.parent_category')}</p>
|
||||
<div className='mt-6'>
|
||||
<Input className='-mt-4' />
|
||||
</div>
|
||||
|
||||
<Button
|
||||
className='w-[172px] absolute bottom-4 left-4'
|
||||
>
|
||||
<div className='flex gap-2 items-center'>
|
||||
<TickCircle size={20} color='white' />
|
||||
<div>
|
||||
{t('blog.submit')}
|
||||
</div>
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default BlogCategory
|
||||
@@ -36,9 +36,9 @@ const BlogList: FC = () => {
|
||||
|
||||
|
||||
<div className='mt-4'>
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='flex items-center gap-4'>
|
||||
<div className='w-[200px]'>
|
||||
<div className='flex flex-col xl:flex-row justify-between items-center xl:items-end'>
|
||||
<div className='flex flex-col xl:flex-row items-center gap-4'>
|
||||
<div className='w-[400px] xl:w-[200px]'>
|
||||
<Select
|
||||
label={t('blog.category')}
|
||||
items={[
|
||||
@@ -50,7 +50,7 @@ const BlogList: FC = () => {
|
||||
className='bg-white border'
|
||||
/>
|
||||
</div>
|
||||
<div className='w-[200px]'>
|
||||
<div className='w-[400px] xl:w-[200px]'>
|
||||
<Select
|
||||
label={t('ads.status')}
|
||||
items={[
|
||||
@@ -62,7 +62,7 @@ const BlogList: FC = () => {
|
||||
className='bg-white border'
|
||||
/>
|
||||
</div>
|
||||
<div className='w-[200px]'>
|
||||
<div className='w-[400px] xl:w-[200px]'>
|
||||
<DatePickerComponent
|
||||
label={t('ads.date')}
|
||||
onChange={() => { }}
|
||||
@@ -73,7 +73,7 @@ const BlogList: FC = () => {
|
||||
</div>
|
||||
|
||||
|
||||
<div className='xl:w-[300px] w-full'>
|
||||
<div className='w-[400px] mt-8 xl:mt-0 xl:w-[300px]'>
|
||||
<Input
|
||||
variant='search'
|
||||
placeholder={t('ads.search')}
|
||||
|
||||
@@ -4,18 +4,17 @@ import { useTranslation } from 'react-i18next'
|
||||
import Input from '../../components/Input'
|
||||
import Button from '../../components/Button'
|
||||
import SwitchComponent from '../../components/Switch'
|
||||
import { TickCircle, TickSquare, Link2 } from 'iconsax-react'
|
||||
import DatePickerComponent from '../../components/DatePicker'
|
||||
import { TickCircle, TickSquare } from 'iconsax-react'
|
||||
import ImageUploader from './components/ImageUploader'
|
||||
import "quill/dist/quill.snow.css";
|
||||
import Quill from 'quill';
|
||||
const CreateBlog: FC = () => {
|
||||
const { t } = useTranslation('global')
|
||||
useEffect(() => {
|
||||
const quill = new Quill('#editor', {
|
||||
new Quill('#editor', {
|
||||
theme: 'snow',
|
||||
});
|
||||
const quill2 = new Quill('#editor2', {
|
||||
new Quill('#editor2', {
|
||||
theme: 'snow',
|
||||
});
|
||||
}, []);
|
||||
@@ -36,7 +35,7 @@ const CreateBlog: FC = () => {
|
||||
</div>
|
||||
</Button>
|
||||
</div>
|
||||
<div className='flex gap-6 xl:mt-8 mt-4'>
|
||||
<div className='flex flex-col-reverse xl:flex-row gap-6 xl:mt-8 mt-4'>
|
||||
<div className='flex-1 min-h-[calc(100vh-201px)] bg-white py-8 xl:px-10 px-4 rounded-3xl'>
|
||||
<div className='mt-6'>
|
||||
<Input
|
||||
@@ -54,11 +53,11 @@ const CreateBlog: FC = () => {
|
||||
<div className='mt-1'>
|
||||
<div className='min-h-[200px]' id='editor2'></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className='min-h-[calc(100vh-201px)] bg-white w-sidebar xl:block hidden py-10 px-5 h-fit rounded-3xl'>
|
||||
<div className='min-h-[calc(100vh-201px)] bg-white w-full xl:w-sidebar py-10 px-5 h-fit rounded-3xl'>
|
||||
<div className='text-sm flex items-center justify-between'>
|
||||
<p>
|
||||
{t('blog.blog_status')}
|
||||
@@ -103,15 +102,12 @@ const CreateBlog: FC = () => {
|
||||
<ImageUploader />
|
||||
<p className='mt-6 text-sm'>{t('blog.tags')}</p>
|
||||
<div className='mt-6'>
|
||||
<Input className='-mt-4'/>
|
||||
<Input className='-mt-4' />
|
||||
<p className='text-description text-xs mt-2'>
|
||||
{t('blog.tag_hint')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user