diff --git a/src/App.tsx b/src/App.tsx index 0872740..9bbef46 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,7 +3,7 @@ import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import CheckENVRoute from "./CheckENVRoute"; import Home from "./components/home/Home"; import Login from "./components/Login"; -import NotFound from "./components/NotFound"; +import NotFound from "./components/UtilityComponents/NotFound"; import RepositoryInfo from "./components/repositoryInfo/RepositoryInfo"; import ProtectedRoute from "./ProtectedRoute"; diff --git a/src/CheckENVRoute.tsx b/src/CheckENVRoute.tsx index b23a05e..8039dc9 100644 --- a/src/CheckENVRoute.tsx +++ b/src/CheckENVRoute.tsx @@ -1,5 +1,5 @@ import { Outlet } from "react-router-dom"; -import ErrorENV from "./components/ErrorENV" +import ErrorENV from "./components/UtilityComponents/ErrorENV" import React from "react"; const CheckENVRoute: React.FC = () => { diff --git a/src/components/ErrorENV.tsx b/src/components/UtilityComponents/ErrorENV.tsx similarity index 100% rename from src/components/ErrorENV.tsx rename to src/components/UtilityComponents/ErrorENV.tsx diff --git a/src/components/UtilityComponents/IconTextField.tsx b/src/components/UtilityComponents/IconTextField.tsx new file mode 100644 index 0000000..e3b57c1 --- /dev/null +++ b/src/components/UtilityComponents/IconTextField.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import { TextField, InputAdornment } from "@mui/material"; + +interface Props { + iconStart: React.ReactNode; + iconEnd: React.ReactNode; + others: any[] +} + +const IconTextField: React.FC = (props) => { + // cosnt { iconStart, iconEnd, ...others } = props; + return ( + {iconStart} + // ) : null, + // endAdornment: iconEnd ? ( + // {iconEnd} + // ) : null + // }} + /> + ); +}; + +export default IconTextField; \ No newline at end of file diff --git a/src/components/Loading.tsx b/src/components/UtilityComponents/Loading.tsx similarity index 100% rename from src/components/Loading.tsx rename to src/components/UtilityComponents/Loading.tsx diff --git a/src/components/NotFound.tsx b/src/components/UtilityComponents/NotFound.tsx similarity index 100% rename from src/components/NotFound.tsx rename to src/components/UtilityComponents/NotFound.tsx diff --git a/src/components/home/Home.tsx b/src/components/home/Home.tsx index 60ec4c5..0be4fa8 100644 --- a/src/components/home/Home.tsx +++ b/src/components/home/Home.tsx @@ -3,7 +3,7 @@ import { List } from "@mui/material"; import RepositoryItem from "./RepositoryEntry"; import useRepositories from "../../hooks/useRepositories"; import Repository from "../../interfaces/Repositoriy"; -import Loading from "../Loading"; +import Loading from "../UtilityComponents/Loading"; const Home: React.FC = () => { const { isFetched, repositories } = useRepositories(); diff --git a/src/components/repositoryInfo/RepositoryInfo.tsx b/src/components/repositoryInfo/RepositoryInfo.tsx index e7e09eb..664d767 100644 --- a/src/components/repositoryInfo/RepositoryInfo.tsx +++ b/src/components/repositoryInfo/RepositoryInfo.tsx @@ -1,15 +1,38 @@ import React from "react"; import { useLocation, Link } from "react-router-dom"; -import { ListItemButton, Button, Box, Card, CardContent, Typography, CardActions, Grid, List, ListItemText, Snackbar, Alert, Tooltip, Collapse, FormGroup, FormControlLabel, Checkbox } from "@mui/material"; +import { + ListItemButton, + Button, + Box, + Card, + CardContent, + Typography, + CardActions, + Grid, + List, + ListItemText, + Snackbar, + Alert, + Tooltip, + Collapse, + FormGroup, + FormControlLabel, + Checkbox, + FormControl, + InputLabel, + Select, + MenuItem, + TextField +} from "@mui/material"; import AccessTimeIcon from '@mui/icons-material/AccessTime'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ExpandLessIcon from '@mui/icons-material/ExpandLess'; +import SearchIcon from '@mui/icons-material/Search'; import useRepositories from "../../hooks/useRepositories"; import Tag from "../../interfaces/Tag"; -import Repository from "../../interfaces/Repositoriy"; import { getHostNameFromURL, printSize, printTimePassed, PrintOSIcon, toUpperFirst, printMonth } from "../../utils"; import RepoNotFound from "./RepoNotFound" -import Loading from "../Loading"; +import Loading from "../UtilityComponents/Loading"; import { digestDisplay } from "../../interfaces/Utils"; const RepositoryInfo: React.FC = () => { @@ -56,6 +79,10 @@ const RepositoryInfo: React.FC = () => { const toggleCollapse = () => { setShowDetails((prev) => !prev); }; + + const handleSortTags = () => { + + } return (isFetched ? ( repository ? ( @@ -198,16 +225,29 @@ const RepositoryInfo: React.FC = () => {
- - - - Sort - + + + + Sort By + + - - - Search - + + + + +