Skip to content

Commit

Permalink
updata DataGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Karkar1ch committed Oct 20, 2024
1 parent 32cfd19 commit 84041d5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/app/admin/(sections)/batches/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Batch, Game } from '@/types/admin.interface';
import Button2 from '@/components/interface/admin/Button2';
import { useRouter } from 'next/navigation';
import { axiosWithAuthAdmin } from '@/api/intreceptors';

import ButtonExit from '@/components/interface/admin/ButtonExit';

const BatchesPage = () => {
Expand Down Expand Up @@ -59,6 +60,7 @@ const BatchesPage = () => {
{ key: "sort" as keyof Batch, label: "Sort" },
];


return (
<div style={{ height: games.length === 0 ? 400 : undefined }} className="mt-20 ml-8 xl:ml-[110px] lg:ml-[250px] md:ml-60 lg:ml-[150px] max-md:ml-[0px] md:mt-8 mb-8 ">
<div className="md:flex md:justify-between max-md:w-full mb-6">
Expand Down
15 changes: 13 additions & 2 deletions src/containers/admin/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,22 @@ const DataGrid = <T extends DataRow>({
) : (
typeof row[key] === 'boolean' ? (
row[key] === true ? (
<div className='w-[30px] h-[30px] text-[#7FFF52] flex justify-center items-center rounded-lg bg-[#1E2E35] border border-[#7FFF52A6]'>
<div
style={{
border: '1px solid transparent',
background: 'linear-gradient(#1E2C35, #1E2C35) padding-box, linear-gradient(to top, #223536, #355D3C) border-box',
}}
className='w-[30px] h-[30px] text-[#7FFF52] flex justify-center items-center rounded-lg bg-[#1E2E35] border border-[#7FFF52A6]'
>
<IoCheckmarkSharp />
</div>
) : (
<div className='w-[30px] h-[30px] text-[#FF8585] flex justify-center items-center rounded-lg bg-[#2B1B36] border border-[#FF8585A6]'>
<div
style={{
border: '1px solid transparent',
background: 'linear-gradient(#2B1B36, #2B1B36) padding-box, linear-gradient(to top,#33203A, #593348) border-box',
}}
className='w-[30px] h-[30px] text-[#FF8585] flex justify-center items-center rounded-lg bg-[#2B1B36] border border-[#FF8585A6]'>
<RxCross2 />
</div>
)
Expand Down

0 comments on commit 84041d5

Please sign in to comment.