Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tab #11

Merged
merged 6 commits into from Jul 23, 2021
Merged

Add tab #11

merged 6 commits into from Jul 23, 2021

Conversation

Surtt
Copy link
Contributor

@Surtt Surtt commented Jul 16, 2021

#9

@fey fey requested a review from frontstall July 16, 2021 09:09
@Surtt
Copy link
Contributor Author

Surtt commented Jul 16, 2021

Я пока закомментировал тесты, так как они пока вообще не писались

- name: Run test
run: make test
# - name: Run test
# run: make test
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
Contributor Author

Choose a reason for hiding this comment

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

actions падает, так как тестов пока нет

Copy link
Collaborator

Choose a reason for hiding this comment

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

Давай простенький тест сделаем.

const TabItem = ({ id, name }) => {
const currentTabId = useSelector((state) => state.tabs.currentTabId);
const dispatch = useDispatch();
const isActive = id === currentTabId ? true : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

давай сделаем false вместо null

{tabsList.map(({ id, name }) => (
<TabItem key={id} id={id} name={name} />
))}
<Button variant="light" onClick={addNewTab}>+</Button>
Copy link
Contributor

Choose a reason for hiding this comment

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

надо бы добавить title

Copy link
Contributor

Choose a reason for hiding this comment

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

ну пожалуйста :)

атрибут title сделает кнопку доступной - посмотри, как ведёт себя кнопка + в хроме, например

@@ -0,0 +1,33 @@
/* eslint-disable no-param-reassign */
import { createSlice } from '@reduxjs/toolkit';
import _ from 'lodash';
Copy link
Contributor

Choose a reason for hiding this comment

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

@fey fey merged commit 0ef62f6 into Hexlet:main Jul 23, 2021
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.

None yet

3 participants