[WEB-5459] feat(codemods): add function declaration transformer with tests (#8137)
- Add jscodeshift-based codemod to convert arrow function components to function declarations - Support React.FC, observer-wrapped, and forwardRef components - Include comprehensive test suite covering edge cases - Add npm script to run transformer across codebase - Target only .tsx files in source directories, excluding node_modules and declaration files * [WEB-5459] chore: updates after running codemod --------- Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
parent
90866fb925
commit
83fdebf64d
1771 changed files with 17003 additions and 13856 deletions
|
|
@ -14,7 +14,7 @@ import { useAppRail } from "@/hooks/use-app-rail";
|
|||
import { ExtendedAppSidebar } from "./extended-sidebar";
|
||||
import { AppSidebar } from "./sidebar";
|
||||
|
||||
export const ProjectAppSidebar: FC = observer(() => {
|
||||
export const ProjectAppSidebar = observer(function ProjectAppSidebar() {
|
||||
// store hooks
|
||||
const {
|
||||
sidebarCollapsed,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { BreadcrumbLink } from "@/components/common/breadcrumb-link";
|
|||
// plane web components
|
||||
import { UpgradeBadge } from "@/plane-web/components/workspace/upgrade-badge";
|
||||
|
||||
export const WorkspaceActiveCycleHeader = observer(() => {
|
||||
export const WorkspaceActiveCycleHeader = observer(function WorkspaceActiveCycleHeader() {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Header>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { Breadcrumbs, Header } from "@plane/ui";
|
|||
// components
|
||||
import { BreadcrumbLink } from "@/components/common/breadcrumb-link";
|
||||
|
||||
export const WorkspaceAnalyticsHeader = observer(() => {
|
||||
export const WorkspaceAnalyticsHeader = observer(function WorkspaceAnalyticsHeader() {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Header>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ function AnalyticsPage({ params }: Route.ComponentProps) {
|
|||
const pageTitle = currentWorkspace?.name
|
||||
? t(`workspace_analytics.page_label`, { workspace: currentWorkspace?.name })
|
||||
: undefined;
|
||||
const ANALYTICS_TABS = useMemo(() => getAnalyticsTabs(t), [t]);
|
||||
const ANALYTICS_TABS = useMemo(function ANALYTICS_TABS() {
|
||||
return getAnalyticsTabs(t);
|
||||
});
|
||||
const tabs: TabItem[] = useMemo(
|
||||
() =>
|
||||
ANALYTICS_TABS.map((tab) => ({
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { useProject } from "@/hooks/store/use-project";
|
|||
import { useAppRouter } from "@/hooks/use-app-router";
|
||||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
|
||||
export const ProjectIssueDetailsHeader = observer(() => {
|
||||
export const ProjectIssueDetailsHeader = observer(function ProjectIssueDetailsHeader() {
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
const { workspaceSlug, workItem } = useParams();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import { useProject } from "@/hooks/store/use-project";
|
|||
import { useUserPermissions } from "@/hooks/store/user";
|
||||
import { useWorkspaceDraftIssues } from "@/hooks/store/workspace-draft";
|
||||
|
||||
export const WorkspaceDraftHeader = observer(() => {
|
||||
export const WorkspaceDraftHeader = observer(function WorkspaceDraftHeader() {
|
||||
// state
|
||||
const [isDraftIssueModalOpen, setIsDraftIssueModalOpen] = useState(false);
|
||||
// store hooks
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { useUserPermissions } from "@/hooks/store/user";
|
|||
import type { TProject } from "@/plane-web/types";
|
||||
import { ExtendedSidebarWrapper } from "./extended-sidebar-wrapper";
|
||||
|
||||
export const ExtendedProjectSidebar = observer(() => {
|
||||
export const ExtendedProjectSidebar = observer(function ExtendedProjectSidebar() {
|
||||
// refs
|
||||
const extendedProjectSidebarRef = useRef<HTMLDivElement | null>(null);
|
||||
const [searchQuery, setSearchQuery] = useState<string>("");
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type Props = {
|
|||
excludedElementId: string;
|
||||
};
|
||||
|
||||
export const ExtendedSidebarWrapper: FC<Props> = observer((props) => {
|
||||
export const ExtendedSidebarWrapper = observer(function ExtendedSidebarWrapper(props: Props) {
|
||||
const { children, extendedSidebarRef, isExtendedSidebarOpened, handleClose, excludedElementId } = props;
|
||||
// store hooks
|
||||
const { storedValue } = useLocalStorage("sidebarWidth", SIDEBAR_WIDTH);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { useWorkspace } from "@/hooks/store/use-workspace";
|
|||
import { ExtendedSidebarItem } from "@/plane-web/components/workspace/sidebar/extended-sidebar-item";
|
||||
import { ExtendedSidebarWrapper } from "./extended-sidebar-wrapper";
|
||||
|
||||
export const ExtendedAppSidebar = observer(() => {
|
||||
export const ExtendedAppSidebar = observer(function ExtendedAppSidebar() {
|
||||
// refs
|
||||
const extendedSidebarRef = useRef<HTMLDivElement | null>(null);
|
||||
// routers
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { useHome } from "@/hooks/store/use-home";
|
|||
// local imports
|
||||
import { StarUsOnGitHubLink } from "./star-us-link";
|
||||
|
||||
export const WorkspaceDashboardHeader = observer(() => {
|
||||
export const WorkspaceDashboardHeader = observer(function WorkspaceDashboardHeader() {
|
||||
// plane hooks
|
||||
const { t } = useTranslation();
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ type TUserProfileHeader = {
|
|||
showProfileIssuesFilter?: boolean;
|
||||
};
|
||||
|
||||
export const UserProfileHeader: FC<TUserProfileHeader> = observer((props) => {
|
||||
export const UserProfileHeader = observer(function UserProfileHeader(props: TUserProfileHeader) {
|
||||
const { userProjectsData, type = undefined, showProfileIssuesFilter } = props;
|
||||
// router
|
||||
const { workspaceSlug, userId } = useParams();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import { IssueLayoutIcon } from "@/components/issues/issue-layouts/layout-icon";
|
|||
// hooks
|
||||
import { useIssues } from "@/hooks/store/use-issues";
|
||||
|
||||
export const ProfileIssuesMobileHeader = observer(() => {
|
||||
export const ProfileIssuesMobileHeader = observer(function ProfileIssuesMobileHeader() {
|
||||
// plane i18n
|
||||
const { t } = useTranslation();
|
||||
// router
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ type Props = {
|
|||
isAuthorized: boolean;
|
||||
};
|
||||
|
||||
export const ProfileNavbar: React.FC<Props> = (props) => {
|
||||
export function ProfileNavbar(props: Props) {
|
||||
const { isAuthorized } = props;
|
||||
const { t } = useTranslation();
|
||||
const { workspaceSlug, userId } = useParams();
|
||||
|
|
@ -40,4 +40,4 @@ export const ProfileNavbar: React.FC<Props> = (props) => {
|
|||
</div>
|
||||
</Header>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const PROJECT_ARCHIVES_BREADCRUMB_LIST: {
|
|||
},
|
||||
};
|
||||
|
||||
export const ProjectArchivesHeader: FC<TProps> = observer((props: TProps) => {
|
||||
export const ProjectArchivesHeader = observer(function ProjectArchivesHeader(props: TProps) {
|
||||
const { activeTab } = props;
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { IssueService } from "@/services/issue";
|
|||
|
||||
const issueService = new IssueService();
|
||||
|
||||
export const ProjectArchivedIssueDetailsHeader = observer(() => {
|
||||
export const ProjectArchivedIssueDetailsHeader = observer(function ProjectArchivedIssueDetailsHeader() {
|
||||
// router
|
||||
const { workspaceSlug, projectId, archivedIssueId } = useParams();
|
||||
// store hooks
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import useLocalStorage from "@/hooks/use-local-storage";
|
|||
// plane web imports
|
||||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
|
||||
export const CycleIssuesHeader: React.FC = observer(() => {
|
||||
export const CycleIssuesHeader = observer(function CycleIssuesHeader() {
|
||||
// refs
|
||||
const parentRef = useRef<HTMLDivElement>(null);
|
||||
// states
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const SUPPORTED_LAYOUTS = [
|
|||
{ key: "calendar", titleTranslationKey: "issue.layouts.calendar", icon: CalendarLayoutIcon },
|
||||
];
|
||||
|
||||
export const CycleIssuesMobileHeader = observer(() => {
|
||||
export const CycleIssuesMobileHeader = observer(function CycleIssuesMobileHeader() {
|
||||
// router
|
||||
const { workspaceSlug, projectId, cycleId } = useParams();
|
||||
// states
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
|
|||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
// constants
|
||||
|
||||
export const CyclesListHeader: FC = observer(() => {
|
||||
export const CyclesListHeader = observer(function CyclesListHeader() {
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
const { workspaceSlug } = useParams();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ const CYCLE_VIEW_LAYOUTS: {
|
|||
},
|
||||
];
|
||||
|
||||
export const CyclesListMobileHeader = observer(() => {
|
||||
export const CyclesListMobileHeader = observer(function CyclesListMobileHeader() {
|
||||
const { currentProjectDetails } = useProject();
|
||||
// hooks
|
||||
const { updateDisplayFilters } = useCycleFilter();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { IssuesHeader } from "@/plane-web/components/issues/header";
|
||||
|
||||
export const ProjectIssuesHeader = () => <IssuesHeader />;
|
||||
export function ProjectIssuesHeader() {
|
||||
return <IssuesHeader />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import {
|
|||
import { useIssues } from "@/hooks/store/use-issues";
|
||||
import { useProject } from "@/hooks/store/use-project";
|
||||
|
||||
export const ProjectIssuesMobileHeader = observer(() => {
|
||||
export const ProjectIssuesMobileHeader = observer(function ProjectIssuesMobileHeader() {
|
||||
// i18n
|
||||
const { t } = useTranslation();
|
||||
const [analyticsModal, setAnalyticsModal] = useState(false);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ import { usePlatformOS } from "@/hooks/use-platform-os";
|
|||
// plane web
|
||||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
|
||||
export const ModuleIssuesHeader: React.FC = observer(() => {
|
||||
export const ModuleIssuesHeader = observer(function ModuleIssuesHeader() {
|
||||
// refs
|
||||
const parentRef = useRef<HTMLDivElement>(null);
|
||||
// states
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const SUPPORTED_LAYOUTS = [
|
|||
{ key: "calendar", i18n_title: "issue.layouts.calendar", icon: CalendarLayoutIcon },
|
||||
];
|
||||
|
||||
export const ModuleIssuesMobileHeader = observer(() => {
|
||||
export const ModuleIssuesMobileHeader = observer(function ModuleIssuesMobileHeader() {
|
||||
// router
|
||||
const { workspaceSlug, projectId, moduleId } = useParams() as {
|
||||
workspaceSlug: string;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
|
|||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
// constants
|
||||
|
||||
export const ModulesListHeader: React.FC = observer(() => {
|
||||
export const ModulesListHeader = observer(function ModulesListHeader() {
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
const { workspaceSlug, projectId } = useParams() as { workspaceSlug: string; projectId: string };
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { ModuleLayoutIcon } from "@/components/modules";
|
|||
import { useModuleFilter } from "@/hooks/store/use-module-filter";
|
||||
import { useProject } from "@/hooks/store/use-project";
|
||||
|
||||
export const ModulesListMobileHeader = observer(() => {
|
||||
export const ModulesListMobileHeader = observer(function ModulesListMobileHeader() {
|
||||
const { currentProjectDetails } = useProject();
|
||||
const { updateDisplayFilters } = useModuleFilter();
|
||||
const { t } = useTranslation();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export interface IPagesHeaderProps {
|
|||
|
||||
const storeType = EPageStoreType.PROJECT;
|
||||
|
||||
export const PageDetailsHeader = observer(() => {
|
||||
export const PageDetailsHeader = observer(function PageDetailsHeader() {
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
const { workspaceSlug, pageId, projectId } = useParams();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/com
|
|||
// plane web hooks
|
||||
import { EPageStoreType, usePageStore } from "@/plane-web/hooks/store";
|
||||
|
||||
export const PagesListHeader = observer(() => {
|
||||
export const PagesListHeader = observer(function PagesListHeader() {
|
||||
// states
|
||||
const [isCreatingPage, setIsCreatingPage] = useState(false);
|
||||
// router
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import { useUserPermissions } from "@/hooks/store/user";
|
|||
import { useAppRouter } from "@/hooks/use-app-router";
|
||||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
|
||||
export const ProjectViewIssuesHeader: React.FC = observer(() => {
|
||||
export const ProjectViewIssuesHeader = observer(function ProjectViewIssuesHeader() {
|
||||
// refs
|
||||
const parentRef = useRef(null);
|
||||
// router
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import { useProject } from "@/hooks/store/use-project";
|
|||
// plane web
|
||||
import { CommonProjectBreadcrumbs } from "@/plane-web/components/breadcrumbs/common";
|
||||
|
||||
export const ProjectViewsHeader = observer(() => {
|
||||
export const ProjectViewsHeader = observer(function ProjectViewsHeader() {
|
||||
const { workspaceSlug, projectId } = useParams() as { workspaceSlug: string; projectId: string };
|
||||
// store hooks
|
||||
const { toggleCreateViewModal } = useCommandPalette();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { ViewOrderByDropdown } from "@/components/views/filters/order-by";
|
|||
import { useMember } from "@/hooks/store/use-member";
|
||||
import { useProjectView } from "@/hooks/store/use-project-view";
|
||||
|
||||
export const ViewMobileHeader = observer(() => {
|
||||
export const ViewMobileHeader = observer(function ViewMobileHeader() {
|
||||
// store hooks
|
||||
const { filters, updateFilters } = useProjectView();
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { ProjectPageRoot } from "@/plane-web/components/projects/page";
|
||||
|
||||
const ProjectsPage = () => <ProjectPageRoot />;
|
||||
function ProjectsPage() {
|
||||
return <ProjectPageRoot />;
|
||||
}
|
||||
|
||||
export default ProjectsPage;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { ProjectPageRoot } from "@/plane-web/components/projects/page";
|
||||
|
||||
const ProjectsPage = () => <ProjectPageRoot />;
|
||||
function ProjectsPage() {
|
||||
return <ProjectPageRoot />;
|
||||
}
|
||||
|
||||
export default ProjectsPage;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { useUserPermissions } from "@/hooks/store/user";
|
|||
// plane web components
|
||||
import { SidebarTeamsList } from "@/plane-web/components/workspace/sidebar/teams-sidebar-list";
|
||||
|
||||
export const AppSidebar: FC = observer(() => {
|
||||
export const AppSidebar = observer(function AppSidebar() {
|
||||
// store hooks
|
||||
const { allowPermissions } = useUserPermissions();
|
||||
const { groupedFavorites } = useFavorite();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import githubWhiteImage from "@/app/assets/logos/github-white.png?url";
|
|||
// helpers
|
||||
import { captureElementAndEvent } from "@/helpers/event-tracker.helper";
|
||||
|
||||
export const StarUsOnGitHubLink = () => {
|
||||
export function StarUsOnGitHubLink() {
|
||||
// plane hooks
|
||||
const { t } = useTranslation();
|
||||
// hooks
|
||||
|
|
@ -40,4 +40,4 @@ export const StarUsOnGitHubLink = () => {
|
|||
<span className="hidden text-xs font-medium sm:hidden md:block">{t("home.star_us_on_github")}</span>
|
||||
</a>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import { useStickyOperations } from "@/components/stickies/sticky/use-operations
|
|||
// hooks
|
||||
import { useSticky } from "@/hooks/use-stickies";
|
||||
|
||||
export const WorkspaceStickyHeader = observer(() => {
|
||||
export const WorkspaceStickyHeader = observer(function WorkspaceStickyHeader() {
|
||||
const { workspaceSlug } = useParams();
|
||||
// hooks
|
||||
const { creatingSticky, toggleShowNewSticky } = useSticky();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import { useIssues } from "@/hooks/store/use-issues";
|
|||
import { useAppRouter } from "@/hooks/use-app-router";
|
||||
import { GlobalViewLayoutSelection } from "@/plane-web/components/views/helper";
|
||||
|
||||
export const GlobalIssuesHeader = observer(() => {
|
||||
export const GlobalIssuesHeader = observer(function GlobalIssuesHeader() {
|
||||
// states
|
||||
const [createViewModal, setCreateViewModal] = useState(false);
|
||||
// router
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
|
|||
// plane web helpers
|
||||
import { shouldRenderSettingLink } from "@/plane-web/helpers/workspace.helper";
|
||||
|
||||
export const MobileWorkspaceSettingsTabs = observer(() => {
|
||||
export const MobileWorkspaceSettingsTabs = observer(function MobileWorkspaceSettingsTabs() {
|
||||
const router = useAppRouter();
|
||||
const { workspaceSlug } = useParams();
|
||||
const pathname = usePathname();
|
||||
|
|
|
|||
|
|
@ -27,26 +27,18 @@ export const WORKSPACE_SETTINGS_ICONS: Record<keyof typeof WORKSPACE_SETTINGS, L
|
|||
webhooks: Webhook,
|
||||
};
|
||||
|
||||
export const WorkspaceActionIcons = ({
|
||||
type,
|
||||
size,
|
||||
className,
|
||||
}: {
|
||||
type: string;
|
||||
size?: number;
|
||||
className?: string;
|
||||
}) => {
|
||||
export function WorkspaceActionIcons({ type, size, className }: { type: string; size?: number; className?: string }) {
|
||||
if (type === undefined) return null;
|
||||
const Icon = WORKSPACE_SETTINGS_ICONS[type as keyof typeof WORKSPACE_SETTINGS_ICONS];
|
||||
if (!Icon) return null;
|
||||
return <Icon size={size} className={className} strokeWidth={2} />;
|
||||
};
|
||||
}
|
||||
|
||||
type TWorkspaceSettingsSidebarProps = {
|
||||
isMobile?: boolean;
|
||||
};
|
||||
|
||||
export const WorkspaceSettingsSidebar = (props: TWorkspaceSettingsSidebarProps) => {
|
||||
export function WorkspaceSettingsSidebar(props: TWorkspaceSettingsSidebarProps) {
|
||||
const { isMobile = false } = props;
|
||||
// router
|
||||
const pathname = usePathname();
|
||||
|
|
@ -77,4 +69,4 @@ export const WorkspaceSettingsSidebar = (props: TWorkspaceSettingsSidebarProps)
|
|||
actionIcons={WorkspaceActionIcons}
|
||||
/>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,18 +19,18 @@ const ICONS = {
|
|||
connections: Blocks,
|
||||
};
|
||||
|
||||
export const ProjectActionIcons = ({ type, size, className }: { type: string; size?: number; className?: string }) => {
|
||||
export function ProjectActionIcons({ type, size, className }: { type: string; size?: number; className?: string }) {
|
||||
if (type === undefined) return null;
|
||||
const Icon = ICONS[type as keyof typeof ICONS];
|
||||
if (!Icon) return null;
|
||||
return <Icon size={size} className={className} strokeWidth={2} />;
|
||||
};
|
||||
}
|
||||
|
||||
type TProfileSidebarProps = {
|
||||
isMobile?: boolean;
|
||||
};
|
||||
|
||||
export const ProfileSidebar = observer((props: TProfileSidebarProps) => {
|
||||
export const ProfileSidebar = observer(function ProfileSidebar(props: TProfileSidebarProps) {
|
||||
const { isMobile = false } = props;
|
||||
// router
|
||||
const pathname = usePathname();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { Button, getButtonStyling } from "@plane/propel/button";
|
|||
import { cn } from "@plane/utils";
|
||||
import { useCommandPalette } from "@/hooks/store/use-command-palette";
|
||||
|
||||
const ProjectSettingsPage = () => {
|
||||
function ProjectSettingsPage() {
|
||||
// store hooks
|
||||
const { resolvedTheme } = useTheme();
|
||||
const { toggleCreateProjectModal } = useCommandPalette();
|
||||
|
|
@ -37,6 +37,6 @@ const ProjectSettingsPage = () => {
|
|||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default ProjectSettingsPage;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
// plane imports
|
||||
import { EAuthModes } from "@plane/constants";
|
||||
// components
|
||||
|
|
@ -11,15 +10,17 @@ import { EPageTypes } from "@/helpers/authentication.helper";
|
|||
import DefaultLayout from "@/layouts/default-layout";
|
||||
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
|
||||
|
||||
const ResetPasswordPage = () => (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.NON_AUTHENTICATED}>
|
||||
<div className="relative z-10 flex flex-col items-center w-screen h-screen overflow-hidden overflow-y-auto pt-6 pb-10 px-8">
|
||||
<AuthHeader type={EAuthModes.SIGN_IN} />
|
||||
<ResetPasswordForm />
|
||||
</div>
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
function ResetPasswordPage() {
|
||||
return (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.NON_AUTHENTICATED}>
|
||||
<div className="relative z-10 flex flex-col items-center w-screen h-screen overflow-hidden overflow-y-auto pt-6 pb-10 px-8">
|
||||
<AuthHeader type={EAuthModes.SIGN_IN} />
|
||||
<ResetPasswordForm />
|
||||
</div>
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default ResetPasswordPage;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
// plane imports
|
||||
import { EAuthModes } from "@plane/constants";
|
||||
// components
|
||||
|
|
@ -11,15 +10,17 @@ import { EPageTypes } from "@/helpers/authentication.helper";
|
|||
import DefaultLayout from "@/layouts/default-layout";
|
||||
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
|
||||
|
||||
const SetPasswordPage = () => (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.SET_PASSWORD}>
|
||||
<div className="relative z-10 flex flex-col items-center w-screen h-screen overflow-hidden overflow-y-auto pt-6 pb-10 px-8">
|
||||
<AuthHeader type={EAuthModes.SIGN_IN} />
|
||||
<ResetPasswordForm />
|
||||
</div>
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
function SetPasswordPage() {
|
||||
return (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.SET_PASSWORD}>
|
||||
<div className="relative z-10 flex flex-col items-center w-screen h-screen overflow-hidden overflow-y-auto pt-6 pb-10 px-8">
|
||||
<AuthHeader type={EAuthModes.SIGN_IN} />
|
||||
<ResetPasswordForm />
|
||||
</div>
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default SetPasswordPage;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@
|
|||
// }, []);
|
||||
// };
|
||||
|
||||
export const PreloadResources = () =>
|
||||
// usePreloadResources();
|
||||
null;
|
||||
export function PreloadResources() {
|
||||
return (
|
||||
// usePreloadResources();
|
||||
null
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
|
@ -43,7 +42,7 @@ const defaultShowPassword = {
|
|||
confirmPassword: false,
|
||||
};
|
||||
|
||||
const SecurityPage = () => {
|
||||
function SecurityPage() {
|
||||
// store
|
||||
const { data: currentUser, changePassword } = useUser();
|
||||
// states
|
||||
|
|
@ -254,6 +253,6 @@ const SecurityPage = () => {
|
|||
</ProfileSettingContentWrapper>
|
||||
</>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default observer(SecurityPage);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import Link from "next/link";
|
||||
|
|
@ -37,7 +36,7 @@ const WORKSPACE_ACTION_LINKS = [
|
|||
},
|
||||
];
|
||||
|
||||
const ProjectActionIcons = ({ type, size, className = "" }: { type: string; size?: number; className?: string }) => {
|
||||
function ProjectActionIcons({ type, size, className = "" }: { type: string; size?: number; className?: string }) {
|
||||
const icons = {
|
||||
profile: CircleUser,
|
||||
security: KeyRound,
|
||||
|
|
@ -51,8 +50,9 @@ const ProjectActionIcons = ({ type, size, className = "" }: { type: string; size
|
|||
const Icon = icons[type as keyof typeof icons];
|
||||
if (!Icon) return null;
|
||||
return <Icon size={size} className={className} />;
|
||||
};
|
||||
export const ProfileLayoutSidebar = observer(() => {
|
||||
}
|
||||
|
||||
export const ProfileLayoutSidebar = observer(function ProfileLayoutSidebar() {
|
||||
// states
|
||||
const [isSigningOut, setIsSigningOut] = useState(false);
|
||||
// router
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
// components
|
||||
import { AuthBase } from "@/components/auth-screens/auth-base";
|
||||
// helpers
|
||||
|
|
@ -8,12 +7,14 @@ import { EAuthModes, EPageTypes } from "@/helpers/authentication.helper";
|
|||
import DefaultLayout from "@/layouts/default-layout";
|
||||
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
|
||||
|
||||
const SignUpPage = () => (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.NON_AUTHENTICATED}>
|
||||
<AuthBase authType={EAuthModes.SIGN_UP} />
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
function SignUpPage() {
|
||||
return (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.NON_AUTHENTICATED}>
|
||||
<AuthBase authType={EAuthModes.SIGN_UP} />
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default SignUpPage;
|
||||
|
|
|
|||
|
|
@ -9,12 +9,14 @@ import DefaultLayout from "@/layouts/default-layout";
|
|||
// wrappers
|
||||
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
|
||||
|
||||
const HomePage = () => (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.NON_AUTHENTICATED}>
|
||||
<AuthBase authType={EAuthModes.SIGN_IN} />
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
function HomePage() {
|
||||
return (
|
||||
<DefaultLayout>
|
||||
<AuthenticationWrapper pageType={EPageTypes.NON_AUTHENTICATED}>
|
||||
<AuthBase authType={EAuthModes.SIGN_IN} />
|
||||
</AuthenticationWrapper>
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default HomePage;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import React from "react";
|
||||
|
||||
// Minimal shim so code using next/image compiles under React Router + Vite
|
||||
|
|
@ -14,7 +13,7 @@ type NextImageProps = React.ImgHTMLAttributes<HTMLImageElement> & {
|
|||
blurDataURL?: string;
|
||||
};
|
||||
|
||||
const Image: React.FC<NextImageProps> = ({
|
||||
function Image({
|
||||
src,
|
||||
alt = "",
|
||||
fill,
|
||||
|
|
@ -23,11 +22,11 @@ const Image: React.FC<NextImageProps> = ({
|
|||
placeholder: _placeholder,
|
||||
blurDataURL: _blurDataURL,
|
||||
...rest
|
||||
}) => {
|
||||
}: NextImageProps) {
|
||||
// If fill is true, apply object-fit styles
|
||||
const style = fill ? { objectFit: "cover" as const, width: "100%", height: "100%" } : rest.style;
|
||||
|
||||
return <img src={src} alt={alt} {...rest} style={style} />;
|
||||
};
|
||||
}
|
||||
|
||||
export default Image;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { Link as RRLink } from "react-router";
|
||||
import { ensureTrailingSlash } from "./helper";
|
||||
|
|
@ -12,13 +11,8 @@ type NextLinkProps = React.ComponentProps<"a"> & {
|
|||
shallow?: boolean; // next.js prop, ignored
|
||||
};
|
||||
|
||||
const Link: React.FC<NextLinkProps> = ({
|
||||
href,
|
||||
replace,
|
||||
prefetch: _prefetch,
|
||||
scroll: _scroll,
|
||||
shallow: _shallow,
|
||||
...rest
|
||||
}) => <RRLink to={ensureTrailingSlash(href)} replace={replace} {...rest} />;
|
||||
function Link({ href, replace, prefetch: _prefetch, scroll: _scroll, shallow: _shallow, ...rest }: NextLinkProps) {
|
||||
return <RRLink to={ensureTrailingSlash(href)} replace={replace} {...rest} />;
|
||||
}
|
||||
|
||||
export default Link;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
|
||||
type ScriptProps = {
|
||||
|
|
@ -14,7 +13,7 @@ type ScriptProps = {
|
|||
};
|
||||
|
||||
// Minimal shim for next/script that creates a script tag
|
||||
const Script: React.FC<ScriptProps> = ({ src, id, strategy: _strategy, onLoad, onError, children, ...rest }) => {
|
||||
function Script({ src, id, strategy: _strategy, onLoad, onError, children, ...rest }: ScriptProps) {
|
||||
useEffect(() => {
|
||||
if (src) {
|
||||
const script = document.createElement("script");
|
||||
|
|
@ -50,6 +49,6 @@ const Script: React.FC<ScriptProps> = ({ src, id, strategy: _strategy, onLoad, o
|
|||
}, [src, id, children, onLoad, onError, rest]);
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
export default Script;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
// plane imports
|
||||
import { isRouteErrorResponse } from "react-router";
|
||||
import { Banner } from "@plane/propel/banner";
|
||||
|
|
@ -12,18 +11,20 @@ interface ErrorActionsProps {
|
|||
onReload?: () => void;
|
||||
}
|
||||
|
||||
const ErrorActions: React.FC<ErrorActionsProps> = ({ onGoHome, onReload }) => (
|
||||
<div className="flex gap-3 pt-2">
|
||||
<Button variant="primary" size="md" onClick={onGoHome}>
|
||||
Go to home
|
||||
</Button>
|
||||
{onReload && (
|
||||
<Button variant="outline-primary" size="md" onClick={onReload}>
|
||||
Reload page
|
||||
function ErrorActions({ onGoHome, onReload }: ErrorActionsProps) {
|
||||
return (
|
||||
<div className="flex gap-3 pt-2">
|
||||
<Button variant="primary" size="md" onClick={onGoHome}>
|
||||
Go to home
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
{onReload && (
|
||||
<Button variant="outline-primary" size="md" onClick={onReload}>
|
||||
Reload page
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
interface DevErrorComponentProps {
|
||||
error: unknown;
|
||||
|
|
@ -31,7 +32,7 @@ interface DevErrorComponentProps {
|
|||
onReload: () => void;
|
||||
}
|
||||
|
||||
export const DevErrorComponent: React.FC<DevErrorComponentProps> = ({ error, onGoHome, onReload }) => {
|
||||
export function DevErrorComponent({ error, onGoHome, onReload }: DevErrorComponentProps) {
|
||||
if (isRouteErrorResponse(error)) {
|
||||
return (
|
||||
<div className="min-h-screen bg-custom-background-90 p-6 flex items-start justify-center transition-none">
|
||||
|
|
@ -152,4 +153,4 @@ export const DevErrorComponent: React.FC<DevErrorComponentProps> = ({ error, onG
|
|||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useAppRouter } from "@/hooks/use-app-router";
|
|||
import { DevErrorComponent } from "./dev";
|
||||
import { ProdErrorComponent } from "./prod";
|
||||
|
||||
export const CustomErrorComponent: React.FC<{ error: unknown }> = ({ error }) => {
|
||||
export function CustomErrorComponent({ error }: { error: unknown }) {
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
|
||||
|
|
@ -18,4 +18,4 @@ export const CustomErrorComponent: React.FC<{ error: unknown }> = ({ error }) =>
|
|||
}
|
||||
|
||||
return <ProdErrorComponent onGoHome={handleGoHome} />;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ interface ProdErrorComponentProps {
|
|||
onGoHome: () => void;
|
||||
}
|
||||
|
||||
export const ProdErrorComponent: React.FC<ProdErrorComponentProps> = ({ onGoHome }) => {
|
||||
export function ProdErrorComponent({ onGoHome }: ProdErrorComponentProps) {
|
||||
// hooks
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
|
|
@ -86,4 +86,4 @@ export const ProdErrorComponent: React.FC<ProdErrorComponentProps> = ({ onGoHome
|
|||
</div>
|
||||
</DefaultLayout>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
// ui
|
||||
import { Button } from "@plane/propel/button";
|
||||
|
|
@ -13,30 +12,32 @@ export const meta: Route.MetaFunction = () => [
|
|||
{ name: "robots", content: "noindex, nofollow" },
|
||||
];
|
||||
|
||||
const PageNotFound = () => (
|
||||
<div className={`h-screen w-full overflow-hidden bg-custom-background-100`}>
|
||||
<div className="grid h-full place-items-center p-4">
|
||||
<div className="space-y-8 text-center">
|
||||
<div className="relative mx-auto h-60 w-60 lg:h-80 lg:w-80">
|
||||
<img src={Image404} className="h-full w-full object-contain" alt="404- Page not found" />
|
||||
function PageNotFound() {
|
||||
return (
|
||||
<div className={`h-screen w-full overflow-hidden bg-custom-background-100`}>
|
||||
<div className="grid h-full place-items-center p-4">
|
||||
<div className="space-y-8 text-center">
|
||||
<div className="relative mx-auto h-60 w-60 lg:h-80 lg:w-80">
|
||||
<img src={Image404} className="h-full w-full object-contain" alt="404- Page not found" />
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<h3 className="text-lg font-semibold">Oops! Something went wrong.</h3>
|
||||
<p className="text-sm text-custom-text-200">
|
||||
Sorry, the page you are looking for cannot be found. It may have been removed, had its name changed, or is
|
||||
temporarily unavailable.
|
||||
</p>
|
||||
</div>
|
||||
<Link href="/">
|
||||
<span className="flex justify-center">
|
||||
<Button variant="neutral-primary" size="md">
|
||||
Go to Home
|
||||
</Button>
|
||||
</span>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<h3 className="text-lg font-semibold">Oops! Something went wrong.</h3>
|
||||
<p className="text-sm text-custom-text-200">
|
||||
Sorry, the page you are looking for cannot be found. It may have been removed, had its name changed, or is
|
||||
temporarily unavailable.
|
||||
</p>
|
||||
</div>
|
||||
<Link href="/">
|
||||
<span className="flex justify-center">
|
||||
<Button variant="neutral-primary" size="md">
|
||||
Go to Home
|
||||
</Button>
|
||||
</span>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
export default PageNotFound;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
"use client";
|
||||
|
||||
import type { FC, ReactNode } from "react";
|
||||
import { lazy, Suspense } from "react";
|
||||
import { useTheme, ThemeProvider } from "next-themes";
|
||||
|
|
@ -18,21 +17,30 @@ import { AppProgressBar } from "@/lib/b-progress";
|
|||
import { StoreProvider } from "@/lib/store-context";
|
||||
// wrappers
|
||||
import { InstanceWrapper } from "@/lib/wrappers/instance-wrapper";
|
||||
|
||||
// lazy imports
|
||||
const StoreWrapper = lazy(() => import("@/lib/wrappers/store-wrapper"));
|
||||
const PostHogProvider = lazy(() => import("@/lib/posthog-provider"));
|
||||
const IntercomProvider = lazy(() => import("@/lib/intercom-provider"));
|
||||
const StoreWrapper = lazy(function StoreWrapper() {
|
||||
return import("@/lib/wrappers/store-wrapper");
|
||||
});
|
||||
|
||||
const PostHogProvider = lazy(function PostHogProvider() {
|
||||
return import("@/lib/posthog-provider");
|
||||
});
|
||||
|
||||
const IntercomProvider = lazy(function IntercomProvider() {
|
||||
return import("@/lib/intercom-provider");
|
||||
});
|
||||
|
||||
export interface IAppProvider {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
const ToastWithTheme = () => {
|
||||
function ToastWithTheme() {
|
||||
const { resolvedTheme } = useTheme();
|
||||
return <Toast theme={resolveGeneralTheme(resolvedTheme)} />;
|
||||
};
|
||||
}
|
||||
|
||||
export const AppProvider: FC<IAppProvider> = (props) => {
|
||||
export function AppProvider(props: IAppProvider) {
|
||||
const { children } = props;
|
||||
// themes
|
||||
return (
|
||||
|
|
@ -56,4 +64,4 @@ export const AppProvider: FC<IAppProvider> = (props) => {
|
|||
</ThemeProvider>
|
||||
</StoreProvider>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
// local imports
|
||||
import { WorkspaceActiveCyclesUpgrade } from "./workspace-active-cycles-upgrade";
|
||||
|
||||
export const WorkspaceActiveCyclesRoot = () => <WorkspaceActiveCyclesUpgrade />;
|
||||
export function WorkspaceActiveCyclesRoot() {
|
||||
return <WorkspaceActiveCyclesUpgrade />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export const WORKSPACE_ACTIVE_CYCLES_DETAILS = [
|
|||
},
|
||||
];
|
||||
|
||||
export const WorkspaceActiveCyclesUpgrade = observer(() => {
|
||||
export const WorkspaceActiveCyclesUpgrade = observer(function WorkspaceActiveCyclesUpgrade() {
|
||||
const { t } = useTranslation();
|
||||
// store hooks
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
|
||||
export const AppRailRoot = () => <></>;
|
||||
export function AppRailRoot() {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ type Props = {
|
|||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
export const AutomationsListWrapper: React.FC<Props> = (props) => <>{props.children}</>;
|
||||
export function AutomationsListWrapper(props: Props) {
|
||||
return <>{props.children}</>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,4 +8,6 @@ export type TCustomAutomationsRootProps = {
|
|||
workspaceSlug: string;
|
||||
};
|
||||
|
||||
export const CustomAutomationsRoot: FC<TCustomAutomationsRootProps> = () => <></>;
|
||||
export function CustomAutomationsRoot(_props: TCustomAutomationsRootProps) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ type TCommonProjectBreadcrumbProps = {
|
|||
isLast?: boolean;
|
||||
};
|
||||
|
||||
export const CommonProjectBreadcrumbs: FC<TCommonProjectBreadcrumbProps> = (props) => {
|
||||
export function CommonProjectBreadcrumbs(props: TCommonProjectBreadcrumbProps) {
|
||||
const { workspaceSlug, projectId, featureKey, isLast = false } = props;
|
||||
return (
|
||||
<>
|
||||
|
|
@ -29,4 +29,4 @@ export const CommonProjectBreadcrumbs: FC<TCommonProjectBreadcrumbProps> = (prop
|
|||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ type TProjectFeatureBreadcrumbProps = {
|
|||
additionalNavigationItems?: TNavigationItem[];
|
||||
};
|
||||
|
||||
export const ProjectFeatureBreadcrumb = observer((props: TProjectFeatureBreadcrumbProps) => {
|
||||
export const ProjectFeatureBreadcrumb = observer(function ProjectFeatureBreadcrumb(
|
||||
props: TProjectFeatureBreadcrumbProps
|
||||
) {
|
||||
const { workspaceSlug, projectId, featureKey, isLast = false, additionalNavigationItems } = props;
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type TProjectBreadcrumbProps = {
|
|||
handleOnClick?: () => void;
|
||||
};
|
||||
|
||||
export const ProjectBreadcrumb = observer((props: TProjectBreadcrumbProps) => {
|
||||
export const ProjectBreadcrumb = observer(function ProjectBreadcrumb(props: TProjectBreadcrumbProps) {
|
||||
const { workspaceSlug, projectId, handleOnClick } = props;
|
||||
// router
|
||||
const router = useAppRouter();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type TChangeWorkItemStateListProps = {
|
|||
handleStateChange: (stateId: string) => void;
|
||||
};
|
||||
|
||||
export const ChangeWorkItemStateList = observer((props: TChangeWorkItemStateListProps) => {
|
||||
export const ChangeWorkItemStateList = observer(function ChangeWorkItemStateList(props: TChangeWorkItemStateListProps) {
|
||||
const { projectId, currentStateId, handleStateChange } = props;
|
||||
// store hooks
|
||||
const { getProjectStates } = useProjectState();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type TProjectLevelModalsProps = {
|
|||
projectId: string;
|
||||
};
|
||||
|
||||
export const ProjectLevelModals = observer((props: TProjectLevelModalsProps) => {
|
||||
export const ProjectLevelModals = observer(function ProjectLevelModals(props: TProjectLevelModalsProps) {
|
||||
const { workspaceSlug, projectId } = props;
|
||||
// store hooks
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export type TWorkItemLevelModalsProps = {
|
|||
workItemIdentifier: string | undefined;
|
||||
};
|
||||
|
||||
export const WorkItemLevelModals: FC<TWorkItemLevelModalsProps> = observer((props) => {
|
||||
export const WorkItemLevelModals = observer(function WorkItemLevelModals(props: TWorkItemLevelModalsProps) {
|
||||
const { workItemIdentifier } = props;
|
||||
// router
|
||||
const { workspaceSlug, cycleId, moduleId } = useParams();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export type TWorkspaceLevelModalsProps = {
|
|||
workspaceSlug: string;
|
||||
};
|
||||
|
||||
export const WorkspaceLevelModals = observer((props: TWorkspaceLevelModalsProps) => {
|
||||
export const WorkspaceLevelModals = observer(function WorkspaceLevelModals(props: TWorkspaceLevelModalsProps) {
|
||||
const { workspaceSlug } = props;
|
||||
// store hooks
|
||||
const { isCreateProjectModalOpen, toggleCreateProjectModal } = useCommandPalette();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import type { TPowerKContextTypeExtended } from "../../types";
|
|||
|
||||
export const CONTEXT_ENTITY_MAP_EXTENDED: Record<TPowerKContextTypeExtended, TContextEntityMap> = {};
|
||||
|
||||
export const PowerKContextBasedActionsExtended: React.FC<ContextBasedActionsProps> = () => null;
|
||||
export function PowerKContextBasedActionsExtended(_props: ContextBasedActionsProps) {
|
||||
return null;
|
||||
}
|
||||
|
||||
export const usePowerKContextBasedExtendedActions = (): TPowerKCommandConfig[] => [];
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ export type TPowerKProjectStatesMenuItemsProps = {
|
|||
workspaceSlug: string;
|
||||
};
|
||||
|
||||
export const PowerKProjectStatesMenuItems: React.FC<TPowerKProjectStatesMenuItemsProps> = observer((props) => {
|
||||
export const PowerKProjectStatesMenuItems = observer(function PowerKProjectStatesMenuItems(
|
||||
props: TPowerKProjectStatesMenuItemsProps
|
||||
) {
|
||||
const { handleSelect, selectedStateId, states } = props;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export type TPowerKModalNoSearchResultsCommandProps = {
|
|||
updateSearchTerm: (value: string) => void;
|
||||
};
|
||||
|
||||
export const PowerKModalNoSearchResultsCommand: React.FC<TPowerKModalNoSearchResultsCommandProps> = (props) => {
|
||||
export function PowerKModalNoSearchResultsCommand(props: TPowerKModalNoSearchResultsCommandProps) {
|
||||
const { updateSearchTerm } = props;
|
||||
// translation
|
||||
const { t } = useTranslation();
|
||||
|
|
@ -33,4 +33,4 @@ export const PowerKModalNoSearchResultsCommand: React.FC<TPowerKModalNoSearchRes
|
|||
/>
|
||||
</Command.Group>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ type TCommentBlock = {
|
|||
children: ReactNode;
|
||||
};
|
||||
|
||||
export const CommentBlock: FC<TCommentBlock> = observer((props) => {
|
||||
export const CommentBlock = observer(function CommentBlock(props: TCommentBlock) {
|
||||
const { comment, ends, quickActions, children } = props;
|
||||
// refs
|
||||
const commentBlockRef = useRef<HTMLDivElement>(null);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { observer } from "mobx-react";
|
|||
import { AppSidebarToggleButton } from "@/components/sidebar/sidebar-toggle-button";
|
||||
import { useAppTheme } from "@/hooks/store/use-app-theme";
|
||||
|
||||
export const ExtendedAppHeader = observer((props: { header: ReactNode }) => {
|
||||
export const ExtendedAppHeader = observer(function ExtendedAppHeader(props: { header: ReactNode }) {
|
||||
const { header } = props;
|
||||
// store hooks
|
||||
const { sidebarCollapsed } = useAppTheme();
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ type TProps = {
|
|||
workspace?: IWorkspace;
|
||||
};
|
||||
|
||||
export const SubscriptionPill = (props: TProps) => <></>;
|
||||
export function SubscriptionPill(props: TProps) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ interface IActiveCycleDetails {
|
|||
showHeader?: boolean;
|
||||
}
|
||||
|
||||
export const ActiveCycleRoot: React.FC<IActiveCycleDetails> = observer((props) => {
|
||||
export const ActiveCycleRoot = observer(function ActiveCycleRoot(props: IActiveCycleDetails) {
|
||||
const { workspaceSlug, projectId, cycleId: propsCycleId, showHeader = true } = props;
|
||||
// theme hook
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
|
@ -47,8 +47,8 @@ export const ActiveCycleRoot: React.FC<IActiveCycleDetails> = observer((props) =
|
|||
cycleIssueDetails,
|
||||
} = useCyclesDetails({ workspaceSlug, projectId, cycleId });
|
||||
|
||||
const ActiveCyclesComponent = useMemo(
|
||||
() => (
|
||||
const ActiveCyclesComponent = useMemo(function ActiveCyclesComponent() {
|
||||
return (
|
||||
<>
|
||||
{!cycleId || !activeCycle ? (
|
||||
<DetailedEmptyState
|
||||
|
|
@ -89,9 +89,8 @@ export const ActiveCycleRoot: React.FC<IActiveCycleDetails> = observer((props) =
|
|||
</div>
|
||||
)}
|
||||
</>
|
||||
),
|
||||
[cycleId, activeCycle, workspaceSlug, projectId, handleFiltersUpdate, cycleIssueDetails]
|
||||
);
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ type Props = {
|
|||
cycleId: string;
|
||||
projectId: string;
|
||||
};
|
||||
export const CycleAdditionalActions: FC<Props> = observer(() => <></>);
|
||||
export const CycleAdditionalActions = observer(function CycleAdditionalActions(_props: Props) {
|
||||
return <></>;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ type ProgressChartProps = {
|
|||
projectId: string;
|
||||
cycleId: string;
|
||||
};
|
||||
export const SidebarChart = observer((props: ProgressChartProps) => {
|
||||
export const SidebarChart = observer(function SidebarChart(props: ProgressChartProps) {
|
||||
const { workspaceSlug, projectId, cycleId } = props;
|
||||
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -10,4 +10,6 @@ type Props = {
|
|||
cycleId: string;
|
||||
};
|
||||
|
||||
export const SidebarChartRoot: FC<Props> = (props) => <SidebarChart {...props} />;
|
||||
export function SidebarChartRoot(props: Props) {
|
||||
return <SidebarChart {...props} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,4 +10,6 @@ interface Props {
|
|||
cycleName: string;
|
||||
}
|
||||
|
||||
export const EndCycleModal: React.FC<Props> = () => <></>;
|
||||
export function EndCycleModal(_props: Props) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type TDeDupeButtonRoot = {
|
|||
label: string;
|
||||
};
|
||||
|
||||
export const DeDupeButtonRoot: FC<TDeDupeButtonRoot> = (props) => {
|
||||
export function DeDupeButtonRoot(props: TDeDupeButtonRoot) {
|
||||
const { workspaceSlug, isDuplicateModalOpen, label, handleOnClick } = props;
|
||||
return <></>;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type TDuplicateModalRootProps = {
|
|||
handleDuplicateIssueModal: (value: boolean) => void;
|
||||
};
|
||||
|
||||
export const DuplicateModalRoot: FC<TDuplicateModalRootProps> = (props) => {
|
||||
export function DuplicateModalRoot(props: TDuplicateModalRootProps) {
|
||||
const { workspaceSlug, issues, handleDuplicateIssueModal } = props;
|
||||
return <></>;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ type TDeDupeIssuePopoverRootProps = {
|
|||
isIntakeIssue?: boolean;
|
||||
};
|
||||
|
||||
export const DeDupeIssuePopoverRoot: FC<TDeDupeIssuePopoverRootProps> = observer((props) => {
|
||||
export const DeDupeIssuePopoverRoot = observer(function DeDupeIssuePopoverRoot(props: TDeDupeIssuePopoverRootProps) {
|
||||
const {} = props;
|
||||
return <></>;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ type TDeDupeIssueButtonLabelProps = {
|
|||
buttonLabel: string;
|
||||
};
|
||||
|
||||
export const DeDupeIssueButtonLabel: FC<TDeDupeIssueButtonLabelProps> = (props) => {
|
||||
export function DeDupeIssueButtonLabel(props: TDeDupeIssueButtonLabelProps) {
|
||||
const { isOpen, buttonLabel } = props;
|
||||
return <></>;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ import type { TCallbackMentionComponentProps } from "@plane/editor";
|
|||
|
||||
export type TEditorMentionComponentProps = TCallbackMentionComponentProps;
|
||||
|
||||
export const EditorAdditionalMentionsRoot: React.FC<TEditorMentionComponentProps> = () => null;
|
||||
export function EditorAdditionalMentionsRoot(_props: TEditorMentionComponentProps) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,6 @@ export interface EpicModalProps {
|
|||
isProjectSelectionDisabled?: boolean;
|
||||
}
|
||||
|
||||
export const CreateUpdateEpicModal: FC<EpicModalProps> = (props) => <></>;
|
||||
export function CreateUpdateEpicModal(props: EpicModalProps) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ type TEstimateListItem = {
|
|||
onDeleteClick?: (estimateId: string) => void;
|
||||
};
|
||||
|
||||
export const EstimateListItemButtons: FC<TEstimateListItem> = observer((props) => {
|
||||
export const EstimateListItemButtons = observer(function EstimateListItemButtons(props: TEstimateListItem) {
|
||||
const { estimateId, isAdmin, isEditable, onDeleteClick } = props;
|
||||
|
||||
if (!isAdmin || !isEditable) return <></>;
|
||||
|
|
|
|||
|
|
@ -5,4 +5,6 @@ export type TEstimateTimeInputProps = {
|
|||
handleEstimateInputValue: (value: string) => void;
|
||||
};
|
||||
|
||||
export const EstimateTimeInput: FC<TEstimateTimeInputProps> = () => <></>;
|
||||
export function EstimateTimeInput(_props: TEstimateTimeInputProps) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ export type TEstimatePointDelete = {
|
|||
estimateSystem: TEstimateSystemKeys;
|
||||
};
|
||||
|
||||
export const EstimatePointDelete: FC<TEstimatePointDelete> = () => <></>;
|
||||
export function EstimatePointDelete(_props: TEstimatePointDelete) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,4 +11,6 @@ type TUpdateEstimateModal = {
|
|||
handleClose: () => void;
|
||||
};
|
||||
|
||||
export const UpdateEstimateModal: FC<TUpdateEstimateModal> = observer(() => <></>);
|
||||
export const UpdateEstimateModal = observer(function UpdateEstimateModal(_props: TUpdateEstimateModal) {
|
||||
return <></>;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export type GanttChartBlocksProps = {
|
|||
ganttContainerRef: React.RefObject<HTMLDivElement>;
|
||||
};
|
||||
|
||||
export const GanttChartRowList: FC<GanttChartBlocksProps> = (props) => {
|
||||
export function GanttChartRowList(props: GanttChartBlocksProps) {
|
||||
const {
|
||||
blockIds,
|
||||
blockUpdateHandler,
|
||||
|
|
@ -56,4 +56,4 @@ export const GanttChartRowList: FC<GanttChartBlocksProps> = (props) => {
|
|||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export type GanttChartBlocksProps = {
|
|||
enableDependency: boolean | ((blockId: string) => boolean);
|
||||
};
|
||||
|
||||
export const GanttChartBlocksList: FC<GanttChartBlocksProps> = (props) => {
|
||||
export function GanttChartBlocksList(props: GanttChartBlocksProps) {
|
||||
const {
|
||||
blockIds,
|
||||
blockToRender,
|
||||
|
|
@ -50,4 +50,4 @@ export const GanttChartBlocksList: FC<GanttChartBlocksProps> = (props) => {
|
|||
))}
|
||||
</>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,6 @@ type LeftDependencyDraggableProps = {
|
|||
ganttContainerRef: RefObject<HTMLDivElement>;
|
||||
};
|
||||
|
||||
export const LeftDependencyDraggable = (props: LeftDependencyDraggableProps) => <></>;
|
||||
export function LeftDependencyDraggable(props: LeftDependencyDraggableProps) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,6 @@ type RightDependencyDraggableProps = {
|
|||
block: IGanttBlock;
|
||||
ganttContainerRef: RefObject<HTMLDivElement>;
|
||||
};
|
||||
export const RightDependencyDraggable = (props: RightDependencyDraggableProps) => <></>;
|
||||
export function RightDependencyDraggable(props: RightDependencyDraggableProps) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { FC } from "react";
|
|||
type Props = {
|
||||
isEpic?: boolean;
|
||||
};
|
||||
export const TimelineDependencyPaths: FC<Props> = (props) => {
|
||||
export function TimelineDependencyPaths(props: Props) {
|
||||
const { isEpic = false } = props;
|
||||
return <></>;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
export const TimelineDraggablePath = () => <></>;
|
||||
export function TimelineDraggablePath() {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { cn } from "@plane/utils";
|
|||
// package.json
|
||||
import packageJson from "package.json";
|
||||
|
||||
export const ProductUpdatesHeader = observer(() => {
|
||||
export const ProductUpdatesHeader = observer(function ProductUpdatesHeader() {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div className="flex gap-2 mx-6 my-4 items-center justify-between flex-shrink-0">
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
import { useTranslation } from "@plane/i18n";
|
||||
import packageJson from "package.json";
|
||||
|
||||
export const PlaneVersionNumber: React.FC = () => {
|
||||
export function PlaneVersionNumber() {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<span>
|
||||
{t("version")}: v{packageJson.version}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
export const HomePageHeader = () => <></>;
|
||||
export function HomePageHeader() {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
import { IssuePeekOverview } from "@/components/issues/peek-overview";
|
||||
|
||||
export const HomePeekOverviewsRoot = () => (
|
||||
<>
|
||||
<IssuePeekOverview />
|
||||
</>
|
||||
);
|
||||
export function HomePeekOverviewsRoot() {
|
||||
return (
|
||||
<>
|
||||
<IssuePeekOverview />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ export type TInboxSourcePill = {
|
|||
source: EInboxIssueSource;
|
||||
};
|
||||
|
||||
export const InboxSourcePill = (props: TInboxSourcePill) => <></>;
|
||||
export function InboxSourcePill(props: TInboxSourcePill) {
|
||||
return <></>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export const MaintenanceMessage = () => {
|
||||
export function MaintenanceMessage() {
|
||||
const linkMap = [
|
||||
{
|
||||
key: "mail_to",
|
||||
|
|
@ -34,4 +34,4 @@ export const MaintenanceMessage = () => {
|
|||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue