Skip to content

TDA 5 | Сreated First Version#1

Open
DanilWeda wants to merge 24 commits intomasterfrom
TDA-5-create-first-components
Open

TDA 5 | Сreated First Version#1
DanilWeda wants to merge 24 commits intomasterfrom
TDA-5-create-first-components

Conversation

@DanilWeda
Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/App.js Outdated
Comment thread src/LoginPage/LoginPage.jsx Outdated
Comment thread src/NewPage/NewPage.jsx Outdated
@DanilWeda DanilWeda force-pushed the TDA-5-create-first-components branch from 4300a1e to f8ba6a5 Compare May 8, 2022 19:11
@DanilWeda DanilWeda force-pushed the TDA-5-create-first-components branch from f8ba6a5 to dff13e4 Compare May 8, 2022 19:15
Comment thread src/Layout/Auth/StyledAuth.js
Comment thread src/components/Button/StyledButton.js Outdated
Comment thread src/components/Button/index.tsx
Comment thread src/hoc/PrivatePage.tsx
Comment thread src/hoc/PublicPage.tsx Outdated
Comment thread src/screens/LoginPage/LoginPage.tsx Outdated
@DanilWeda DanilWeda changed the title Tda 5 create first components TDA 5 | Сreated First Version Sep 2, 2022
Comment on lines +13 to +14
--minWidth: 700px;
--minHeight: 300px;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do you need those --

Comment on lines +50 to +52
border: 1px solid ${({ theme }) => theme.colorCancel};
background-color: ${({ theme }) => theme.colorCancel};
transition: ${({ theme }) => theme.btnTransition};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you also can use a function with the theme here, if you need to return three styles in one func
${({ theme }) =>border: 1px solid ${theme.colorCancel};
background-color: ${theme.colorCancel};
transition: ${theme.btnTransition}};

Comment thread src/Layout/Auth/index.tsx
Comment on lines +14 to +17



return (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

a lot of spaces

Comment thread src/Layout/Auth/index.tsx
<Wrapper>
<Root>
<BtnWrapper>
{location.pathname !== paths.newUser && <BackButton onClick={() => navigate(-1)} > back</BackButton>}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it's better to use goBack()


&:hover {
transition: ${({ theme }) => theme.btnTransition};
background-color: ${({ color, theme }) => color === 'cancel' ? theme.colorError : theme.colorAcceptLight};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do you have a line characters limit? like 80?

Comment thread src/hoc/PublicPage.tsx
<>
{
isAuth ? (
<Navigate to={paths.todos} />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

like here

const navigate = useNavigate();

if (isAuth) {
navigate('/todos');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

here you can use path variable too

const docSnap = await getDocs(collection(db, 'todos'));
const data: ITodo[] = [];
docSnap.forEach(doc => {
// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why you need to ignore smth here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you can add types for getDocs or docSnap

});


// export const { } = todoSlice.actions;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove?

? await createUserWithEmailAndPassword(auth, uEmail, uPassword)
: await signInWithEmailAndPassword(auth, uEmail, uPassword);

// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why? I think you can add some checker here (google TypeGuard)

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