From d5ff0b4c44b30ba514a7662fc9e2b9109e467dcf Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Fri, 17 Apr 2020 14:27:03 +0200 Subject: [PATCH] [chore]: Components folder organisation --- .../components/{ => Avatars}/AvatarList.tsx | 2 +- .../components/{ => Avatars}/UserAvatar.tsx | 0 .../src/components/{ => Buttons}/Button.tsx | 0 .../{ => Buttons}/FloatingButton.tsx | 0 .../components/{ => Cards}/HorizontalCard.tsx | 4 +-- .../components/{ => Cards}/ProjectCard.tsx | 11 ++++---- .../src/components/{ => Cards}/TicketCard.tsx | 2 +- .../components/{ => Lists}/ActivityList.tsx | 6 ++--- .../components/{ => Lists}/AppFileList.tsx | 8 +++--- .../src/components/{ => Lists}/MemberList.tsx | 6 ++--- .../components/{ => Lists}/ProjectList.tsx | 6 ++--- .../src/components/{ => Lists}/TicketList.tsx | 19 +++++++------- client/src/components/LogInForm.tsx | 2 +- client/src/components/{ => Modals}/Modal.tsx | 0 .../{ => Modals}/NewTicketModal.tsx | 14 +++++------ .../components/{ => Modals}/UsersModal.tsx | 14 +++++------ .../{ => Modals}/UsersModalEntry.tsx | 6 ++--- .../{ => Panels}/ProjectTabPanel.tsx | 12 ++++----- .../src/components/{ => Panels}/TabRouter.tsx | 14 +++++------ .../{ => Panels}/TabRouterHeader.tsx | 0 .../components/{ => Panels}/UserTabPanel.tsx | 8 +++--- .../components/{ => Panels}/UserTabRouter.tsx | 8 +++--- client/src/components/ProfileSelector.tsx | 2 +- .../components/{ => Progress}/ProgressBar.tsx | 7 ------ .../{ => Progress}/ProgressInfo.tsx | 25 +++++++++---------- client/src/components/UserHeader.tsx | 2 +- client/src/pages/ProjectPage.tsx | 14 +++++------ client/src/pages/TicketPage.tsx | 2 +- client/src/pages/UserPage.tsx | 2 +- 29 files changed, 92 insertions(+), 104 deletions(-) rename client/src/components/{ => Avatars}/AvatarList.tsx (95%) rename client/src/components/{ => Avatars}/UserAvatar.tsx (100%) rename client/src/components/{ => Buttons}/Button.tsx (100%) rename client/src/components/{ => Buttons}/FloatingButton.tsx (100%) rename client/src/components/{ => Cards}/HorizontalCard.tsx (90%) rename client/src/components/{ => Cards}/ProjectCard.tsx (78%) rename client/src/components/{ => Cards}/TicketCard.tsx (95%) rename client/src/components/{ => Lists}/ActivityList.tsx (83%) rename client/src/components/{ => Lists}/AppFileList.tsx (83%) rename client/src/components/{ => Lists}/MemberList.tsx (86%) rename client/src/components/{ => Lists}/ProjectList.tsx (93%) rename client/src/components/{ => Lists}/TicketList.tsx (86%) rename client/src/components/{ => Modals}/Modal.tsx (100%) rename client/src/components/{ => Modals}/NewTicketModal.tsx (88%) rename client/src/components/{ => Modals}/UsersModal.tsx (88%) rename client/src/components/{ => Modals}/UsersModalEntry.tsx (84%) rename client/src/components/{ => Panels}/ProjectTabPanel.tsx (92%) rename client/src/components/{ => Panels}/TabRouter.tsx (76%) rename client/src/components/{ => Panels}/TabRouterHeader.tsx (100%) rename client/src/components/{ => Panels}/UserTabPanel.tsx (93%) rename client/src/components/{ => Panels}/UserTabRouter.tsx (80%) rename client/src/components/{ => Progress}/ProgressBar.tsx (85%) rename client/src/components/{ => Progress}/ProgressInfo.tsx (61%) diff --git a/client/src/components/AvatarList.tsx b/client/src/components/Avatars/AvatarList.tsx similarity index 95% rename from client/src/components/AvatarList.tsx rename to client/src/components/Avatars/AvatarList.tsx index 35d5f86..5c1cf8a 100644 --- a/client/src/components/AvatarList.tsx +++ b/client/src/components/Avatars/AvatarList.tsx @@ -2,7 +2,7 @@ import React, { FC } from "react"; import { Link } from "react-router-dom"; import Avatar from "@material-ui/core/Avatar"; import AvatarGroup from "@material-ui/lab/AvatarGroup"; -import { User } from "../types/User"; +import { User } from "../../types/User"; import { makeStyles, Theme, createStyles } from "@material-ui/core"; interface AvatarListProps { diff --git a/client/src/components/UserAvatar.tsx b/client/src/components/Avatars/UserAvatar.tsx similarity index 100% rename from client/src/components/UserAvatar.tsx rename to client/src/components/Avatars/UserAvatar.tsx diff --git a/client/src/components/Button.tsx b/client/src/components/Buttons/Button.tsx similarity index 100% rename from client/src/components/Button.tsx rename to client/src/components/Buttons/Button.tsx diff --git a/client/src/components/FloatingButton.tsx b/client/src/components/Buttons/FloatingButton.tsx similarity index 100% rename from client/src/components/FloatingButton.tsx rename to client/src/components/Buttons/FloatingButton.tsx diff --git a/client/src/components/HorizontalCard.tsx b/client/src/components/Cards/HorizontalCard.tsx similarity index 90% rename from client/src/components/HorizontalCard.tsx rename to client/src/components/Cards/HorizontalCard.tsx index 1ba66a4..d93c223 100644 --- a/client/src/components/HorizontalCard.tsx +++ b/client/src/components/Cards/HorizontalCard.tsx @@ -1,11 +1,11 @@ -import React, { FC, MouseEvent, ReactNode } from "react"; +import React, { FC, ReactNode } from "react"; import { Link } from "react-router-dom"; import { makeStyles } from "@material-ui/core/styles"; import Card from "@material-ui/core/Card"; import CardActions from "@material-ui/core/CardActions"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; -import { ProgressBar } from "./ProgressBar"; +import { ProgressBar } from "../Progress/ProgressBar"; interface IProps { title?: string; diff --git a/client/src/components/ProjectCard.tsx b/client/src/components/Cards/ProjectCard.tsx similarity index 78% rename from client/src/components/ProjectCard.tsx rename to client/src/components/Cards/ProjectCard.tsx index 004a6a1..3f3fe9a 100644 --- a/client/src/components/ProjectCard.tsx +++ b/client/src/components/Cards/ProjectCard.tsx @@ -1,11 +1,10 @@ import React, { FC } from "react"; import { HorizontalCard } from "./HorizontalCard"; -import { Typography, makeStyles, Theme, createStyles } from "@material-ui/core"; -import { getRemainingdays } from "../utils/methods"; -import { User } from "../types/User"; -import { AvatarList } from "./AvatarList"; -import { ProgressBar } from "./ProgressBar"; -import { ProgressInfo } from "./ProgressInfo"; +import { makeStyles, Theme, createStyles } from "@material-ui/core"; +import { AvatarList } from "../Avatars/AvatarList"; +import { ProgressInfo } from "../Progress/ProgressInfo"; +import { User } from "../../types/User"; +import { getRemainingdays } from "../../utils/methods"; interface IProps { title?: string; diff --git a/client/src/components/TicketCard.tsx b/client/src/components/Cards/TicketCard.tsx similarity index 95% rename from client/src/components/TicketCard.tsx rename to client/src/components/Cards/TicketCard.tsx index f1130f6..5447449 100644 --- a/client/src/components/TicketCard.tsx +++ b/client/src/components/Cards/TicketCard.tsx @@ -1,7 +1,7 @@ import React, { FC, MouseEvent } from "react"; import { HorizontalCard } from "./HorizontalCard"; import { Button, Typography } from "@material-ui/core"; -import { getRemainingdays } from "../utils/methods"; +import { getRemainingdays } from "../../utils/methods"; interface IProps { title?: string; diff --git a/client/src/components/ActivityList.tsx b/client/src/components/Lists/ActivityList.tsx similarity index 83% rename from client/src/components/ActivityList.tsx rename to client/src/components/Lists/ActivityList.tsx index f362964..c70082c 100644 --- a/client/src/components/ActivityList.tsx +++ b/client/src/components/Lists/ActivityList.tsx @@ -1,7 +1,7 @@ import React, { FC, useState, ChangeEvent, MouseEvent } from "react"; -import { ActivityCollection } from "./ActivityCollection"; -import { Activity } from "../types/Activity"; -import { FilterBar } from "./FilterBar"; +import { ActivityCollection } from "../ActivityCollection"; +import { Activity } from "../../types/Activity"; +import { FilterBar } from "../FilterBar"; type IProps = { activities: Activity[]; diff --git a/client/src/components/AppFileList.tsx b/client/src/components/Lists/AppFileList.tsx similarity index 83% rename from client/src/components/AppFileList.tsx rename to client/src/components/Lists/AppFileList.tsx index ce15934..028d18b 100644 --- a/client/src/components/AppFileList.tsx +++ b/client/src/components/Lists/AppFileList.tsx @@ -1,8 +1,8 @@ import React, { FC, useState, ChangeEvent, MouseEvent } from "react"; -import { AppFile } from "../types/AppFile"; -import { FileCollection } from "./FileCollection"; -import { InputFile } from "./InputFile"; -import { FilterBar } from "./FilterBar"; +import { AppFile } from "../../types/AppFile"; +import { FileCollection } from "../FileCollection"; +import { InputFile } from "../InputFile"; +import { FilterBar } from "../FilterBar"; import { Grid, Typography } from "@material-ui/core"; type IProps = { diff --git a/client/src/components/MemberList.tsx b/client/src/components/Lists/MemberList.tsx similarity index 86% rename from client/src/components/MemberList.tsx rename to client/src/components/Lists/MemberList.tsx index feadf27..631fe80 100644 --- a/client/src/components/MemberList.tsx +++ b/client/src/components/Lists/MemberList.tsx @@ -1,7 +1,7 @@ import React, { FC, useState, ChangeEvent, MouseEvent } from "react"; -import { UsersModalEntry } from "./UsersModalEntry"; -import { FilterBar } from "./FilterBar"; -import { User } from "../types/User"; +import { UsersModalEntry } from "../Modals/UsersModalEntry"; +import { FilterBar } from "../FilterBar"; +import { User } from "../../types/User"; interface IProps { users: User[]; diff --git a/client/src/components/ProjectList.tsx b/client/src/components/Lists/ProjectList.tsx similarity index 93% rename from client/src/components/ProjectList.tsx rename to client/src/components/Lists/ProjectList.tsx index 878b5f2..a7ca012 100644 --- a/client/src/components/ProjectList.tsx +++ b/client/src/components/Lists/ProjectList.tsx @@ -6,9 +6,9 @@ import { createStyles, Theme, } from "@material-ui/core"; -import { FilterBar } from "./FilterBar"; -import ProjectCard from "./ProjectCard"; -import { Project } from "../types/Project"; +import { FilterBar } from "../FilterBar"; +import ProjectCard from "../Cards/ProjectCard"; +import { Project } from "../../types/Project"; const useStyles = makeStyles((theme: Theme) => createStyles({ diff --git a/client/src/components/TicketList.tsx b/client/src/components/Lists/TicketList.tsx similarity index 86% rename from client/src/components/TicketList.tsx rename to client/src/components/Lists/TicketList.tsx index 87630f9..75efda4 100644 --- a/client/src/components/TicketList.tsx +++ b/client/src/components/Lists/TicketList.tsx @@ -6,16 +6,15 @@ import { Theme, createStyles, } from "@material-ui/core"; -import { FloatingButton } from "./FloatingButton"; -import { HorizontalCard } from "./HorizontalCard"; -import { FilterBar } from "./FilterBar"; -import { HttpResponse } from "../types/HttpResponse"; -import { Ticket } from "../types/Ticket"; -import { NewTicketModal } from "./NewTicketModal"; -import { Project } from "../types/Project"; -import { put } from "../utils/http"; -import { Constants } from "../utils/Constants"; -import TicketCard from "./TicketCard"; +import { FloatingButton } from "../Buttons/FloatingButton"; +import { FilterBar } from "../FilterBar"; +import { HttpResponse } from "../../types/HttpResponse"; +import { Ticket } from "../../types/Ticket"; +import { NewTicketModal } from "../Modals/NewTicketModal"; +import { Project } from "../../types/Project"; +import { put } from "../../utils/http"; +import { Constants } from "../../utils/Constants"; +import TicketCard from "../Cards/TicketCard"; const useStyles = makeStyles((theme: Theme) => createStyles({ diff --git a/client/src/components/LogInForm.tsx b/client/src/components/LogInForm.tsx index 9ef2fb0..4a85da7 100644 --- a/client/src/components/LogInForm.tsx +++ b/client/src/components/LogInForm.tsx @@ -1,7 +1,7 @@ import React, { FC } from "react"; import { InputField } from "./InputField"; import { PasswordField } from "./PasswordField"; -import { Button } from "./Button"; +import { Button } from "./Buttons/Button"; export const LogInForm: FC = () => { return ( diff --git a/client/src/components/Modal.tsx b/client/src/components/Modals/Modal.tsx similarity index 100% rename from client/src/components/Modal.tsx rename to client/src/components/Modals/Modal.tsx diff --git a/client/src/components/NewTicketModal.tsx b/client/src/components/Modals/NewTicketModal.tsx similarity index 88% rename from client/src/components/NewTicketModal.tsx rename to client/src/components/Modals/NewTicketModal.tsx index c586a69..304f932 100644 --- a/client/src/components/NewTicketModal.tsx +++ b/client/src/components/Modals/NewTicketModal.tsx @@ -1,11 +1,11 @@ import React, { FC, useState, FormEvent } from "react"; import { useRouteMatch } from "react-router-dom"; import { Modal } from "./Modal"; -import { NewTicketForm } from "./NewTicketForm"; -import { Ticket } from "../types/Ticket"; -import { Project } from "../types/Project"; -import { post } from "../utils/http"; -import { Constants } from "../utils/Constants"; +import { NewTicketForm } from "../NewTicketForm"; +import { Ticket } from "../../types/Ticket"; +import { Project } from "../../types/Project"; +import { post } from "../../utils/http"; +import { Constants } from "../../utils/Constants"; interface IProps { show: boolean; @@ -16,7 +16,7 @@ interface IProps { export const NewTicketModal: FC = ({ show, handleClose, - allProjects + allProjects, }) => { const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); @@ -35,7 +35,7 @@ export const NewTicketModal: FC = ({ description: description, endingDate: new Date(endingDate).toISOString(), creatorId: "20bf4b2a-7209-4826-96cd-29c2bc937a94", - projectId: parseInt(projectId) + projectId: parseInt(projectId), }; // const response: HttpResponse = diff --git a/client/src/components/UsersModal.tsx b/client/src/components/Modals/UsersModal.tsx similarity index 88% rename from client/src/components/UsersModal.tsx rename to client/src/components/Modals/UsersModal.tsx index f09f8c0..7c6695b 100644 --- a/client/src/components/UsersModal.tsx +++ b/client/src/components/Modals/UsersModal.tsx @@ -1,10 +1,10 @@ import React, { FC, useState, ChangeEvent, FormEvent } from "react"; import { Modal } from "./Modal"; -import { AvatarList } from "./AvatarList"; -import { User } from "../types/User"; -import { FilterBar } from "./FilterBar"; -import { patch } from "../utils/http"; -import { Constants } from "../utils/Constants"; +import { AvatarList } from "../Avatars/AvatarList"; +import { User } from "../../types/User"; +import { FilterBar } from "../FilterBar"; +import { patch } from "../../utils/http"; +import { Constants } from "../../utils/Constants"; import { UsersModalEntry } from "./UsersModalEntry"; import { useParams } from "react-router-dom"; @@ -19,7 +19,7 @@ export const UsersModal: FC = ({ show, handleClose, users, - allUsers + allUsers, }) => { const [filterText, setFilterText] = useState(""); const [members, setMembers] = useState(users); @@ -35,7 +35,7 @@ export const UsersModal: FC = ({ e.preventDefault(); await patch( `${Constants.projectsURI}/${id}/members`, - members.map(m => m.id) + members.map((m) => m.id) ); handleClose(); }; diff --git a/client/src/components/UsersModalEntry.tsx b/client/src/components/Modals/UsersModalEntry.tsx similarity index 84% rename from client/src/components/UsersModalEntry.tsx rename to client/src/components/Modals/UsersModalEntry.tsx index 36a67f4..7e7f04c 100644 --- a/client/src/components/UsersModalEntry.tsx +++ b/client/src/components/Modals/UsersModalEntry.tsx @@ -1,5 +1,5 @@ import React, { FC } from "react"; -import { User } from "../types/User"; +import { User } from "../../types/User"; interface IProps { setMembers: React.Dispatch>; @@ -9,7 +9,7 @@ interface IProps { export const UsersModalEntry: FC = ({ user, setMembers, members }) => { const match: (id: string) => boolean = (id: string) => { - return Boolean(members.find(m => m.id === id)); + return Boolean(members.find((m) => m.id === id)); }; return (
@@ -22,7 +22,7 @@ export const UsersModalEntry: FC = ({ user, setMembers, members }) => { onChange={() => { !match(user.id) ? setMembers([...members, user]) - : setMembers(members.filter(p => p.id !== user.id)); + : setMembers(members.filter((p) => p.id !== user.id)); }} /> diff --git a/client/src/components/ProjectTabPanel.tsx b/client/src/components/Panels/ProjectTabPanel.tsx similarity index 92% rename from client/src/components/ProjectTabPanel.tsx rename to client/src/components/Panels/ProjectTabPanel.tsx index 7d241c3..d008411 100644 --- a/client/src/components/ProjectTabPanel.tsx +++ b/client/src/components/Panels/ProjectTabPanel.tsx @@ -1,16 +1,16 @@ import React, { FC, useState, ReactNode } from "react"; -import SwipeableViews from "react-swipeable-views"; import { makeStyles, Theme, useTheme } from "@material-ui/core/styles"; import AppBar from "@material-ui/core/AppBar"; import Tabs from "@material-ui/core/Tabs"; import Tab from "@material-ui/core/Tab"; import Typography from "@material-ui/core/Typography"; import Box from "@material-ui/core/Box"; -import { Ticket } from "../types/Ticket"; -import { Project } from "../types/Project"; -import { FileList } from "./AppFileList"; -import { TicketList } from "./TicketList"; -import { AppFile } from "../types/AppFile"; +import SwipeableViews from "react-swipeable-views"; +import { Ticket } from "../../types/Ticket"; +import { Project } from "../../types/Project"; +import { TicketList } from "../Lists/TicketList"; +// import { FileList } from "./AppFileList"; +import { AppFile } from "../../types/AppFile"; interface TabProps { children?: ReactNode; diff --git a/client/src/components/TabRouter.tsx b/client/src/components/Panels/TabRouter.tsx similarity index 76% rename from client/src/components/TabRouter.tsx rename to client/src/components/Panels/TabRouter.tsx index 2f34d2a..24f9286 100644 --- a/client/src/components/TabRouter.tsx +++ b/client/src/components/Panels/TabRouter.tsx @@ -1,12 +1,12 @@ import React, { FC } from "react"; import { Route, useRouteMatch, Redirect } from "react-router-dom"; import { TabRouterHeader } from "./TabRouterHeader"; -import { TicketList } from "./TicketList"; -import { FileList } from "./AppFileList"; -import { Ticket } from "../types/Ticket"; -import { AppFile } from "../types/AppFile"; -import { Activity } from "../types/Activity"; -import { Project } from "../types/Project"; +import { TicketList } from "../Lists/TicketList"; +import { FileList } from "../Lists/AppFileList"; +import { Ticket } from "../../types/Ticket"; +import { AppFile } from "../../types/AppFile"; +import { Activity } from "../../types/Activity"; +import { Project } from "../../types/Project"; interface IProps { tickets: Ticket[]; @@ -22,7 +22,7 @@ export const TabRouter: FC = ({ tabNames, files, activities, - allProjects + allProjects, }) => { const { url } = useRouteMatch(); diff --git a/client/src/components/TabRouterHeader.tsx b/client/src/components/Panels/TabRouterHeader.tsx similarity index 100% rename from client/src/components/TabRouterHeader.tsx rename to client/src/components/Panels/TabRouterHeader.tsx diff --git a/client/src/components/UserTabPanel.tsx b/client/src/components/Panels/UserTabPanel.tsx similarity index 93% rename from client/src/components/UserTabPanel.tsx rename to client/src/components/Panels/UserTabPanel.tsx index 254185f..17123cf 100644 --- a/client/src/components/UserTabPanel.tsx +++ b/client/src/components/Panels/UserTabPanel.tsx @@ -6,10 +6,10 @@ import Tabs from "@material-ui/core/Tabs"; import Tab from "@material-ui/core/Tab"; import Typography from "@material-ui/core/Typography"; import Box from "@material-ui/core/Box"; -import { Ticket } from "../types/Ticket"; -import { Project } from "../types/Project"; -import { ProjectList } from "./ProjectList"; -import { TicketList } from "./TicketList"; +import { Ticket } from "../../types/Ticket"; +import { Project } from "../../types/Project"; +import { ProjectList } from "../Lists/ProjectList"; +import { TicketList } from "../Lists/TicketList"; interface TabProps { children?: ReactNode; diff --git a/client/src/components/UserTabRouter.tsx b/client/src/components/Panels/UserTabRouter.tsx similarity index 80% rename from client/src/components/UserTabRouter.tsx rename to client/src/components/Panels/UserTabRouter.tsx index af30bf3..dd3fea1 100644 --- a/client/src/components/UserTabRouter.tsx +++ b/client/src/components/Panels/UserTabRouter.tsx @@ -1,10 +1,10 @@ import React, { FC } from "react"; import { Route, useRouteMatch, Redirect } from "react-router-dom"; import { TabRouterHeader } from "./TabRouterHeader"; -import { ProjectList } from "./ProjectList"; -import { Ticket } from "../types/Ticket"; -import { Project } from "../types/Project"; -import { TicketList } from "./TicketList"; +import { ProjectList } from "../Lists/ProjectList"; +import { Ticket } from "../../types/Ticket"; +import { Project } from "../../types/Project"; +import { TicketList } from "../Lists/TicketList"; interface IProps { tabNames: string[]; diff --git a/client/src/components/ProfileSelector.tsx b/client/src/components/ProfileSelector.tsx index 19cae4e..3c6fdb9 100644 --- a/client/src/components/ProfileSelector.tsx +++ b/client/src/components/ProfileSelector.tsx @@ -1,5 +1,5 @@ import React, { FC } from "react"; -import { UserAvatar } from "./UserAvatar"; +import { UserAvatar } from "./Avatars/UserAvatar"; import { Link } from "react-router-dom"; export const ProfileSelector: FC = () => { diff --git a/client/src/components/ProgressBar.tsx b/client/src/components/Progress/ProgressBar.tsx similarity index 85% rename from client/src/components/ProgressBar.tsx rename to client/src/components/Progress/ProgressBar.tsx index ef1a8da..e3f837c 100644 --- a/client/src/components/ProgressBar.tsx +++ b/client/src/components/Progress/ProgressBar.tsx @@ -2,7 +2,6 @@ import React, { FC } from "react"; import { makeStyles, Theme, createStyles } from "@material-ui/core/styles"; import LinearProgress from "@material-ui/core/LinearProgress"; import { Box } from "@material-ui/core"; -import { PlaylistAddCheck } from "@material-ui/icons"; type IProps = { value: number; @@ -44,9 +43,3 @@ export const ProgressBar: FC = ({ value }) => { ); }; - -{ - /*
-
-
*/ -} diff --git a/client/src/components/ProgressInfo.tsx b/client/src/components/Progress/ProgressInfo.tsx similarity index 61% rename from client/src/components/ProgressInfo.tsx rename to client/src/components/Progress/ProgressInfo.tsx index 0faadc4..17f741a 100644 --- a/client/src/components/ProgressInfo.tsx +++ b/client/src/components/Progress/ProgressInfo.tsx @@ -1,6 +1,5 @@ import React, { FC } from "react"; -import { makeStyles, Theme, createStyles } from "@material-ui/core/styles"; -import LinearProgress from "@material-ui/core/LinearProgress"; +// import { makeStyles, Theme, createStyles } from "@material-ui/core/styles"; import { Box } from "@material-ui/core"; import { PlaylistAddCheck } from "@material-ui/icons"; @@ -10,23 +9,23 @@ type IProps = { remainingDays?: number; }; -const useStyles = makeStyles((theme: Theme) => - createStyles({ - root: { - width: "100%", - "& > * + *": { - marginTop: theme.spacing(2), - }, - }, - }) -); +// const useStyles = makeStyles((theme: Theme) => +// createStyles({ +// root: { +// width: "100%", +// "& > * + *": { +// marginTop: theme.spacing(2), +// }, +// }, +// }) +// ); export const ProgressInfo: FC = ({ tasksDone, tasksTotalCount, remainingDays, }) => { - const classes = useStyles(); + // const classes = useStyles(); return ( diff --git a/client/src/components/UserHeader.tsx b/client/src/components/UserHeader.tsx index c57ae51..98f6ff9 100644 --- a/client/src/components/UserHeader.tsx +++ b/client/src/components/UserHeader.tsx @@ -1,6 +1,6 @@ import React, { FC } from "react"; import { Header } from "../components/Header"; -import { UserAvatar } from "./UserAvatar"; +import { UserAvatar } from "./Avatars/UserAvatar"; import { Grid, // makeStyles, Theme diff --git a/client/src/pages/ProjectPage.tsx b/client/src/pages/ProjectPage.tsx index 93044cb..43e12cd 100644 --- a/client/src/pages/ProjectPage.tsx +++ b/client/src/pages/ProjectPage.tsx @@ -1,14 +1,14 @@ import React, { FC, useState } from "react"; import { Grid, makeStyles, Theme } from "@material-ui/core"; import { Header } from "../components/Header"; -import { AvatarList } from "../components/AvatarList"; -import { ProgressBar } from "../components/ProgressBar"; -import { FloatingButton } from "../components/FloatingButton"; -import { UsersModal } from "../components/UsersModal"; -import { ProjectTabPanel } from "../components/ProjectTabPanel"; +import { AvatarList } from "../components/Avatars/AvatarList"; +import { ProgressBar } from "../components/Progress/ProgressBar"; +import { FloatingButton } from "../components/Buttons/FloatingButton"; +import { UsersModal } from "../components/Modals/UsersModal"; +import { ProjectTabPanel } from "../components/Panels/ProjectTabPanel"; import ProjectVM from "../VM/ProjectVM"; import PageLayout from "../layouts/PageLayout"; -import { ProgressInfo } from "../components/ProgressInfo"; +import { ProgressInfo } from "../components/Progress/ProgressInfo"; interface IProps { viewModel: ProjectVM; @@ -62,8 +62,6 @@ export const ProjectPage: FC = ({ viewModel }) => { alignItems="center" > - {/* - */}