Skip to content

Commit

Permalink
chore: layout refactor (#2532)
Browse files Browse the repository at this point in the history
* chore: layout refactor

* fix: profile auth issue

* chore: project setting layout refactor

* chore: workspace layout refactor

* chore: profile layout refactor

* chore: layout import refactor
  • Loading branch information
anmolsinghbhatia authored Oct 25, 2023
1 parent d72d3da commit cea39c7
Show file tree
Hide file tree
Showing 39 changed files with 1,487 additions and 2,021 deletions.
1 change: 1 addition & 0 deletions web/components/headers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ export * from "./project-draft-issues";
export * from "./project-archived-issue-details";
export * from "./project-archived-issues";
export * from "./project-issue-details";
export * from "./user-profile";
25 changes: 25 additions & 0 deletions web/components/headers/user-profile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { FC } from "react";

import { useRouter } from "next/router";

// ui
import { BreadcrumbItem, Breadcrumbs } from "@plane/ui";
// hooks
import { observer } from "mobx-react-lite";

export const UserProfileHeader: FC = observer(() => {
const router = useRouter();
return (
<div
className={`relative flex w-full flex-shrink-0 flex-row z-10 items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4`}
>
<div className="flex items-center gap-2 flex-grow w-full whitespace-nowrap overflow-ellipsis">
<div>
<Breadcrumbs onBack={() => router.back()}>
<BreadcrumbItem title="User Profile" unshrinkTitle />
</Breadcrumbs>
</div>
</div>
</div>
);
});
9 changes: 3 additions & 6 deletions web/components/profile/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import Link from "next/link";

// components
import { ProfileIssuesFilter } from "components/profile";
// types
import { UserAuth } from "types";

type Props = {
memberRole: UserAuth;
isAuthorized: boolean;
};

const viewerTabs = [
Expand Down Expand Up @@ -38,12 +36,11 @@ const adminTabs = [
},
];

export const ProfileNavbar: React.FC<Props> = ({ memberRole }) => {
export const ProfileNavbar: React.FC<Props> = ({ isAuthorized }) => {
const router = useRouter();
const { workspaceSlug, userId } = router.query;

const tabsList =
memberRole.isOwner || memberRole.isMember || memberRole.isViewer ? [...viewerTabs, ...adminTabs] : viewerTabs;
const tabsList = isAuthorized ? [...viewerTabs, ...adminTabs] : viewerTabs;

return (
<div className="sticky -top-0.5 z-[1] md:static px-4 sm:px-5 flex items-center justify-between gap-4 bg-custom-background-100 border-b border-custom-border-300">
Expand Down
75 changes: 0 additions & 75 deletions web/layouts/app-layout-legacy/app-header.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions web/layouts/app-layout-legacy/app-sidebar.tsx

This file was deleted.

1 change: 0 additions & 1 deletion web/layouts/app-layout-legacy/layout.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions web/layouts/auth-layout-legacy/index.ts

This file was deleted.

122 changes: 0 additions & 122 deletions web/layouts/auth-layout-legacy/project-authorization-wrapper.tsx

This file was deleted.

42 changes: 0 additions & 42 deletions web/layouts/auth-layout-legacy/user-authorization-wrapper.tsx

This file was deleted.

Loading

0 comments on commit cea39c7

Please sign in to comment.