Skip to content

Commit

Permalink
Merge pull request #67 from 001elijah/dashboard
Browse files Browse the repository at this point in the history
bugs
  • Loading branch information
001elijah committed Jul 4, 2023
2 parents 9efd330 + f338f95 commit 99db310
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 7 deletions.
8 changes: 8 additions & 0 deletions src/components/DefaultBoard/Default.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@
}

.defaultLink {
cursor: pointer;
&.dark,
&.light {
color: #bedbb0;
&:hover{
color: #5255bc;
}
}
&.colorful {
color: #5255bc;

&:hover{
color: #bedbb0;
}
}
}
28 changes: 22 additions & 6 deletions src/components/DefaultBoard/DefaultBoard.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
import { selectorTheme } from 'redux/Auth/authSelectors';
import { useSelector } from 'react-redux';
import { useDispatch, useSelector } from 'react-redux';
import clsx from 'clsx';
import React from 'react';
import React, { useState } from 'react';
import { HeaderDashBoard } from 'components/HeaderDashBoard/HeaderDashBoard';
import s from './Default.module.scss';
import { BoardModalWindow } from '../BoardModalWindow/BoardModalWindow';

export const DefaultDashBoard = () => {
import { addNewBoard } from 'redux/Boards/boardsOperations';
export const DefaultDashBoard = () => {
const dispatch = useDispatch();
const theme = useSelector(selectorTheme);
const [showModalWindow, setShowModalWindow] = useState(false);
const handleModalWindowOpen = () => setShowModalWindow(true);
const handleModalWindowClose = () => setShowModalWindow(false);

const handleAddBoard = async newBoard => {
await dispatch(addNewBoard(newBoard));
};
return (
<>
<div className={clsx(s.backGround, s[theme])}>
<HeaderDashBoard />

<p className={clsx(s.defaultTitle, s[theme])}>
Before starting your project, it is essential
<span className={clsx(s.defaultLink, s[theme])}>
{' '}
to create a board{' '}
<span className={clsx(s.defaultLink, s[theme])} onClick={handleModalWindowOpen}> to create a board
</span>
to visualize and track all the necessary tasks and milestones. This
board serves as a powerful tool to organize the workflow and ensure
effective collaboration among team members.
</p>
</div>
{showModalWindow && (
<BoardModalWindow
titleModalButton="Create"
modalTitle="New board"
handleToggleModal={handleModalWindowClose}
onSubmit={handleAddBoard}
/>
)}
</>
);
};
3 changes: 3 additions & 0 deletions src/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ export const Sidebar = () => {
<Logout theme={theme} />
{showModalWindow && (
<BoardModalWindow
inputTitle=''
titleModalButton="Create"
modalTitle="New board"
handleToggleModal={handleModalWindowClose}
onSubmit={handleAddBoard}
activeIcon=''
activeBackground=''
/>
)}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/TaskCard/TaskCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const TaskCard = ({
const currentDate = new Date().toLocaleDateString('en-GB');
const endDate = new Date(deadline).toLocaleDateString('en-GB');
const isDeadline = endDate === currentDate;

let labelCapitalizeFirstLetter =
label.charAt(0).toUpperCase() + label.slice(1);

Expand Down
2 changes: 2 additions & 0 deletions src/components/TaskColumn/TaskColumn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export const TaskColumn = ({ columnId }) => {
}),
);
};

console.log(cards);
return (
<>
<ul
Expand Down
2 changes: 2 additions & 0 deletions src/components/UserInfo/UserInfo.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
align-items: center;
column-gap: 8px;

cursor: pointer;

.name {
font-family: 'Poppins-SemiBold';
font-size: 14px;
Expand Down

0 comments on commit 99db310

Please sign in to comment.