Merge pull request #63 from makeplane/develop

promote: develop to preview
This commit is contained in:
sriram veeraghanta
2023-12-30 21:49:07 +05:30
committed by GitHub
4 changed files with 14 additions and 4 deletions

View File

@@ -46,7 +46,7 @@ export const ThemeSwitch: FC<Props> = (props) => {
}
onChange={onChange}
input
width="w-full"
width="w-full z-20"
>
{THEME_OPTIONS.map((themeOption) => (
<CustomSelect.Option key={themeOption.value} value={themeOption}>

View File

@@ -48,7 +48,7 @@ export const ProjectLayoutRoot: React.FC = observer(() => {
{Object.keys(getIssues ?? {}).length == 0 ? (
<ProjectEmptyState />
) : (
<div className="relative h-full w-full overflow-auto">
<div className="relative h-full w-full overflow-auto bg-custom-background-90">
{activeLayout === "list" ? (
<ListLayout />
) : activeLayout === "kanban" ? (

View File

@@ -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<IProjectDetailsForm> = (props) => {
control,
setValue,
setError,
reset,
formState: { errors, isSubmitting },
} = useForm<IProject>({
defaultValues: {
@@ -51,6 +52,15 @@ export const ProjectDetailsForm: FC<IProjectDetailsForm> = (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<HTMLInputElement>) => {
const { value } = event.target;

View File

@@ -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