diff --git a/web/components/core/theme/theme-switch.tsx b/web/components/core/theme/theme-switch.tsx index 78364562f..60ef272a2 100644 --- a/web/components/core/theme/theme-switch.tsx +++ b/web/components/core/theme/theme-switch.tsx @@ -46,7 +46,7 @@ export const ThemeSwitch: FC = (props) => { } onChange={onChange} input - width="w-full" + width="w-full z-20" > {THEME_OPTIONS.map((themeOption) => ( diff --git a/web/components/cycles/sidebar.tsx b/web/components/cycles/sidebar.tsx index b371a138b..e73168008 100644 --- a/web/components/cycles/sidebar.tsx +++ b/web/components/cycles/sidebar.tsx @@ -273,7 +273,7 @@ export const CycleDetailsSidebar: React.FC = observer((props) => { [workspaceSlug, projectId, cycleId, issueFilters, updateFilters] ); - const cycleStatus = cycleDetails.status.toLocaleLowerCase(); + const cycleStatus = cycleDetails?.status.toLocaleLowerCase(); const isCompleted = cycleStatus === "completed"; const isStartValid = new Date(`${cycleDetails?.start_date}`) <= new Date(); diff --git a/web/components/issues/issue-layouts/roots/project-layout-root.tsx b/web/components/issues/issue-layouts/roots/project-layout-root.tsx index db30e4b7c..39f6872cc 100644 --- a/web/components/issues/issue-layouts/roots/project-layout-root.tsx +++ b/web/components/issues/issue-layouts/roots/project-layout-root.tsx @@ -48,7 +48,7 @@ export const ProjectLayoutRoot: React.FC = observer(() => { {Object.keys(getIssues ?? {}).length == 0 ? ( ) : ( -
+
{activeLayout === "list" ? ( ) : activeLayout === "kanban" ? ( diff --git a/web/components/project/form.tsx b/web/components/project/form.tsx index 708890271..9dddc16e9 100644 --- a/web/components/project/form.tsx +++ b/web/components/project/form.tsx @@ -1,4 +1,4 @@ -import { FC } from "react"; +import { FC, useEffect } from "react"; import { Controller, useForm } from "react-hook-form"; // components import EmojiIconPicker from "components/emoji-icon-picker"; @@ -42,6 +42,7 @@ export const ProjectDetailsForm: FC = (props) => { control, setValue, setError, + reset, formState: { errors, isSubmitting }, } = useForm({ defaultValues: { @@ -51,6 +52,15 @@ export const ProjectDetailsForm: FC = (props) => { }, }); + useEffect(() => { + if (!project) return; + reset({ + ...project, + emoji_and_icon: project.emoji ?? project.icon_prop, + workspace: (project.workspace as IWorkspace).id, + }); + }, [project, reset]); + const handleIdentifierChange = (event: React.ChangeEvent) => { const { value } = event.target; diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx index ef815ac82..bdff9bf10 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/index.tsx @@ -29,7 +29,7 @@ const GeneralSettingsPage: NextPageWithLayout = observer(() => { const { workspaceSlug, projectId } = router.query; // api call to fetch project details useSWR( - workspaceSlug && projectId ? "PROJECT_DETAILS" : null, + workspaceSlug && projectId ? `PROJECT_DETAILS_${projectId}` : null, workspaceSlug && projectId ? () => projectStore.fetchProjectDetails(workspaceSlug.toString(), projectId.toString()) : null