Skip to content

Commit

Permalink
Reviewed, errors noted
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodoro committed Oct 12, 2024
1 parent 30dd6f5 commit 6e79441
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/app/admin/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default function DashboardLayout({
<div className='flex justify-between w-full'>
<div className='inline-block md:hidden'>
<img src='/img/interface/nav/logo.png' alt="Логотип" width={'39px'} height={'41px'} />
{/* //FIX: В отдельный компонент и использовать от next */}
</div>
<div className='inline-block'>
<button onClick={toggleNavbar} className={`transition-transform duration-300`}>
Expand All @@ -58,6 +59,7 @@ export default function DashboardLayout({
</div>
</div>
</div>
{/* //FIX: Обьяснить и исправить этот ужас (у тебя нагрузка из-за этого х2)*/}
<div className='md:hidden'>
{!isNavVisible && children}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/admin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const page = () => {
<p className='mr-[10px]'>Exit</p>
<FaDoorOpen className=''/>
</Button>
{/* //FIX: Перенести в лояут и сделать как компонент */}
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/interface/admin/Button2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ const Button2 = React.forwardRef<HTMLButtonElement, ButtonProps>(
);

Button2.displayName = 'Button2'

//FIX: Топ название
export default Button2
2 changes: 2 additions & 0 deletions src/components/interface/admin/ChooseRows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const ChooseRows = React.forwardRef<HTMLButtonElement, ChooseRowsProps>((props,
>
{selectedValue}
{isOpen ? <IoIosArrowUp className="ml-1 transition-transform duration-200" /> : <IoIosArrowDown className="ml-1 transition-transform duration-200" />}
{/* //FIX: Переворот а не новый элемент */}
</button>
</div>

Expand All @@ -45,6 +46,7 @@ const ChooseRows = React.forwardRef<HTMLButtonElement, ChooseRowsProps>((props,
<a href="#" onClick={() => handleSelect(20)} className="block text-white hover:bg-[#22276E] px-[15px] transition-colors duration-200" role="menuitem">
20
</a>
{/* //FIX: Зач ссылки? Это минус SEO */}
</div>
</div>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/components/interface/admin/Still.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Still: React.FC<Settingprops> = ({ onClick1, onClick2 }) => {
bg-[#171741] w-[148px] h-[99px]
absolute left-0 top-full z-50 rounded-[18px]
border border-[#FFFFFF26]
transition-opacity transition-transform
transition-all
duration-300 py-[17px] px-[10px]
${isExiting ? 'opacity-0 scale-95' : 'opacity-100 scale-100'}`}
style={{
Expand All @@ -43,6 +43,7 @@ const Still: React.FC<Settingprops> = ({ onClick1, onClick2 }) => {
}}
>
<div>
{/* //FIX: Больше гибкости окну. Сделать где нужно кнопки, где нужно ссылки */}
<button onClick={onClick1} className="inline-block mb-[5px] text-[15px]">
<IoDocuments className="inline-block"/> <p className="inline-block">Duplicate</p>
</button>
Expand Down
10 changes: 5 additions & 5 deletions src/containers/admin/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ interface DataGridProps<T> {
showStillButton?: boolean;
}

interface Column<T> {
key: keyof T | string;
label: string;
render?: (row: T) => React.ReactNode;
}
// interface Column<T> {
// key: keyof T | string;
// label: string;
// render?: (row: T) => React.ReactNode;
// }

const DataGrid = <T extends DataRow>({ data, columns, showDeleteButton = false, showStillButton = false, showSettingsButton = false }: DataGridProps<T>) => {
const [sortConfig, setSortConfig] = useState<{ key: string; direction: string } | null>(null);
Expand Down
18 changes: 16 additions & 2 deletions src/containers/admin/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client"
import Link from 'next/link'
import React, {ForwardRefRenderFunction , ForwardedRef, useImperativeHandle, forwardRef, useRef} from 'react'
import React, { ForwardRefRenderFunction, ForwardedRef, useImperativeHandle, forwardRef, useRef } from 'react'
import Image from 'next/image'
import Button from '@/components/interface/admin/Buttоn';
import Button1 from '@/components/interface/Button'
Expand All @@ -23,6 +23,20 @@ interface NavbarProps {
className?: string;
}

const menu = [
{
link: 'href',
icon: <IoIosDocument />,
name: 'Name'
},
{
link: 'href',
icon: <IoIosDocument />,
name: 'Name'
},
]
//FIX: Переделать в массив

const Navbar: React.FC<NavbarProps> = ({ isVisible, onClose, className }) => {
const pathname = usePathname();
const [mobileOpen, setMobileOpen] = React.useState(false);
Expand Down Expand Up @@ -111,7 +125,7 @@ const Navbar: React.FC<NavbarProps> = ({ isVisible, onClose, className }) => {
<div className='md:hidden'>
<Button1 className='w-full' onClick={() => { authService.logout(); window.location.reload(); }}>
<p className='mr-[10px]'>Exit</p>
<FaDoorOpen className=''/>
<FaDoorOpen className='' />
</Button1>
</div>
</div>
Expand Down

0 comments on commit 6e79441

Please sign in to comment.