[WEB-5567] chore: change Gantt layout to Timeline layout in initiatives screen #4956
This commit is contained in:
@@ -5,16 +5,16 @@ export const BASE_LAYOUTS: IBaseLayoutConfig[] = [
|
||||
{
|
||||
key: "list",
|
||||
icon: ListLayoutIcon,
|
||||
label: "List Layout",
|
||||
i18n_title: "issue.layouts.title.list",
|
||||
},
|
||||
{
|
||||
key: "kanban",
|
||||
icon: BoardLayoutIcon,
|
||||
label: "Board Layout",
|
||||
i18n_title: "issue.layouts.title.kanban",
|
||||
},
|
||||
{
|
||||
key: "gantt",
|
||||
icon: TimelineLayoutIcon,
|
||||
label: "Gantt Layout",
|
||||
i18n_title: "issue.layouts.title.gantt",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from "react";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { Tooltip } from "@plane/propel/tooltip";
|
||||
import type { TBaseLayoutType } from "@plane/types";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
@@ -13,6 +14,7 @@ type Props = {
|
||||
export function LayoutSwitcher(props: Props) {
|
||||
const { layouts, onChange, selectedLayout } = props;
|
||||
const { isMobile } = usePlatformOS();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleOnChange = (layoutKey: TBaseLayoutType) => {
|
||||
if (selectedLayout !== layoutKey) {
|
||||
@@ -25,7 +27,7 @@ export function LayoutSwitcher(props: Props) {
|
||||
{BASE_LAYOUTS.filter((l) => (layouts ? layouts.includes(l.key) : true)).map((layout) => {
|
||||
const Icon = layout.icon;
|
||||
return (
|
||||
<Tooltip key={layout.key} tooltipContent={layout.label} isMobile={isMobile}>
|
||||
<Tooltip key={layout.key} tooltipContent={t(layout.i18n_title)} isMobile={isMobile}>
|
||||
<button
|
||||
type="button"
|
||||
className={`group grid h-[22px] w-7 place-items-center overflow-hidden rounded transition-all hover:bg-custom-background-100 ${
|
||||
|
||||
@@ -57,7 +57,7 @@ export type TBaseLayoutType = "list" | "kanban" | "gantt";
|
||||
export interface IBaseLayoutConfig {
|
||||
key: TBaseLayoutType;
|
||||
icon: React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
||||
label: string;
|
||||
i18n_title: string;
|
||||
}
|
||||
|
||||
// Base Layout Props
|
||||
|
||||
Reference in New Issue
Block a user