Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: layout refactor #2532

Merged
merged 6 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading