fix: edit project button redirection (#2564)

* fix: redirect to project settings

* fix: 404 page button alignment
This commit is contained in:
Aaryan Khandelwal 2023-10-31 12:06:55 +05:30 committed by GitHub
parent 8b7b5c54b9
commit 1c2ea6da5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 3 deletions

View File

@ -186,7 +186,12 @@ export const ProjectCard: React.FC<ProjectCardProps> = observer((props) => {
{(isOwner || isMember) && ( {(isOwner || isMember) && (
<button <button
className="flex items-center justify-center p-1 text-custom-text-400 hover:bg-custom-background-80 hover:text-custom-text-200 rounded" className="flex items-center justify-center p-1 text-custom-text-400 hover:bg-custom-background-80 hover:text-custom-text-200 rounded"
onClick={() => router.push(`/${workspaceSlug}/projects/${project.id}/settings`)} onClick={(e) => {
e.preventDefault();
e.stopPropagation();
router.push(`/${workspaceSlug}/projects/${project.id}/settings`);
}}
> >
<Pencil className="h-3.5 w-3.5" /> <Pencil className="h-3.5 w-3.5" />
</button> </button>

View File

@ -4,7 +4,6 @@ export * from "./card-list";
export * from "./card"; export * from "./card";
export * from "./create-project-modal"; export * from "./create-project-modal";
export * from "./delete-project-modal"; export * from "./delete-project-modal";
export * from "./delete-project-section";
export * from "./form-loader"; export * from "./form-loader";
export * from "./form"; export * from "./form";
export * from "./join-project-modal"; export * from "./join-project-modal";

View File

@ -15,6 +15,7 @@ export interface IDeleteProjectSection {
export const DeleteProjectSection: React.FC<IDeleteProjectSection> = (props) => { export const DeleteProjectSection: React.FC<IDeleteProjectSection> = (props) => {
const { projectDetails, handleDelete } = props; const { projectDetails, handleDelete } = props;
return ( return (
<Disclosure as="div" className="border-t border-custom-border-400"> <Disclosure as="div" className="border-t border-custom-border-400">
{({ open }) => ( {({ open }) => (

View File

@ -1 +1,2 @@
export * from "./delete-project-section";
export * from "./features-list"; export * from "./features-list";

View File

@ -27,7 +27,7 @@ const PageNotFound: NextPage = () => (
</p> </p>
</div> </div>
<Link href="/"> <Link href="/">
<a className="block"> <a className="flex justify-center">
<Button variant="neutral-primary" size="md"> <Button variant="neutral-primary" size="md">
Go to Home Go to Home
</Button> </Button>