Skip to content

blacklist#1

Open
NedoDno wants to merge 1 commit intomainfrom
blacklist
Open

blacklist#1
NedoDno wants to merge 1 commit intomainfrom
blacklist

Conversation

@NedoDno
Copy link

@NedoDno NedoDno commented Apr 11, 2025

No description provided.

import { Route, Routes } from 'react-router-dom';

import { HomePage, LoginPage } from '@/pages';
import { BlacklistPage } from '@/pages/blacklist-page/ui/BlacklistPage';
Copy link
Collaborator

@darrpyy darrpyy Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import { HomePage, LoginPage, BlacklistPage } from '@/pages';

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

эту страницу можно удалить

import {RemoveBlacklistWidget, Header} from "@/widgets";
import {Table, TableData, Title} from '@mantine/core';

const tableData: TableData = {
Copy link
Collaborator

@darrpyy darrpyy Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для данных таблицы лучше сделать type используя TypeScript(по модели из бекенда обычно делается), но можно просто пока как в данном примере поля в типе сделать. Сами данные таблицы вынести в config.ts. Тип для вынести в model/types.ts

@@ -0,0 +1,21 @@
import {RemoveBlacklistWidget, Header} from "@/widgets";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Как я понимаю это модальное окно, в мантин уже есть готовое и можно использовать его + встроенные хуки для обработки
  2. это можно перенести в папку страницы блеклиста, так как он только там используется. Заполнить модалку из мантин в папке страницы

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Выше описала на странице по этому компоненту, что можно взять модалку мантин(это проще). Чем писать свою логику. Плюс в таблицу напротив каждого юзера можно вставить кнопку компонент IconButton и при нажатии передавать типизированный обьект юзер(не разбирать отдельно на много пропов в компонент, так в целом это антипаттерн). Обращаться уже потом user.name, user.contactInfo и т.д

@@ -0,0 +1,31 @@
import { Container, Text, Button, Group, Box } from '@mantine/core';

interface BlacklistWidgetProps {
Copy link
Collaborator

@darrpyy darrpyy Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут скорее всего нужно сделать интерфейс UserInformation. И в пропах передавть обьекст юзера


interface RemoveFromBlacklistProps {
name: string;
onConfirm: () => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в мантин есть готовое модальное окно + хуки

export {Header} from './header/Header.tsx';
export {Map} from './map/Map.tsx'; No newline at end of file
export {Map} from './map/Map.tsx';
export {BlacklistWidget} from './blacklist/AddBlackList.tsx';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше перенести в ui страницы блеклист(они только к ней относятся)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не нужно отслеживать гитом(в гитигнор добавить) и надо удалить

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не нужно отслеживать гитом(в гитигнор добавить) и надо удалить

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это не нужно отслеживать гитом(в гитигнор добавить) и надо удалить

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это надо откатить, конфиги все настроены уже

Copy link
Collaborator

@darrpyy darrpyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes requsted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants