Refactor routes with layout and show search bar in project details page (#23)

* Refactor routes with layout and show search bar in project details page

* Set common search layout for child routes
This commit is contained in:
2023-12-22 14:19:59 +05:30
committed by GitHub
parent e93cca598a
commit ef72a0351e
14 changed files with 141 additions and 73 deletions
@@ -39,7 +39,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ project }) => {
</MenuList>
</Menu>
</div>
<div className="border-slate-200 border-t-2 border-solid p-4 bg-gray-50">
<div className="border-t-2 border-solid p-4 bg-gray-50">
<Typography variant="small" color="gray">
{project.latestCommit.message}
</Typography>
@@ -17,7 +17,7 @@ interface ProjectsSearchProps {
onChange?: (data: ProjectDetails) => void;
}
const ProjectSearch = ({ onChange }: ProjectsSearchProps) => {
const ProjectSearchBar = ({ onChange }: ProjectsSearchProps) => {
const [items, setItems] = useState<ProjectDetails[]>([]);
const [selectedItem, setSelectedItem] = useState<ProjectDetails | null>(null);
@@ -105,4 +105,4 @@ const ProjectSearch = ({ onChange }: ProjectsSearchProps) => {
);
};
export default ProjectSearch;
export default ProjectSearchBar;
@@ -31,7 +31,7 @@ const DeployStep = ({
const [collapse, setCollapse] = useState(false);
return (
<div className="border-b-2 border-slate-200">
<div className="border-b-2">
<div className="flex justify-between p-2 gap-2">
{status === DeployStatus.NOT_STARTED && <div>{step}</div>}
{status === DeployStatus.PROCESSING && <div>O</div>}
@@ -57,8 +57,8 @@ const DeleteProjectDialog = ({
>
<DialogBody className="flex flex-col gap-2">
<Typography variant="paragraph">
Deleting your project is irreversible. Enter your projects name
&nbsp;
Deleting your project is irreversible. Enter your projects
name&nbsp;
<span className="bg-blue-100 text-blue-700">({project.name})</span>
&nbsp;below to confirm you want to permanently delete it:
</Typography>