update background color
This commit is contained in:
@@ -15,7 +15,7 @@ import { Pages } from "../../../config/Pages";
|
||||
import { ErrorType } from "../../../helpers/types";
|
||||
import { useSingleUpload } from "../../service/hooks/useServiceData";
|
||||
import CreateProjectSidebar, {
|
||||
BACKGROUND_PRESETS,
|
||||
findMatchingBackgroundPreset,
|
||||
SelectedUser,
|
||||
} from "./components/CreateProjectSidebar";
|
||||
import { useGetProjectDetail, useUpdateProject } from "./hooks/useProjectData";
|
||||
@@ -32,7 +32,7 @@ const UpdateProject: FC = () => {
|
||||
const [isActive, setIsActive] = useState(true);
|
||||
const [selectedColor, setSelectedColor] = useState("#A8E6CF");
|
||||
const [selectedUsers, setSelectedUsers] = useState<SelectedUser[]>([]);
|
||||
const [selectedBackground, setSelectedBackground] = useState<string>(BACKGROUND_PRESETS[0]);
|
||||
const [selectedBackground, setSelectedBackground] = useState<string | null>(null);
|
||||
const [backgroundImage, setBackgroundImage] = useState<File | null>(null);
|
||||
const [workspaceId, setWorkspaceId] = useState("");
|
||||
const [existingBackgroundPicture, setExistingBackgroundPicture] = useState("");
|
||||
@@ -119,7 +119,9 @@ const UpdateProject: FC = () => {
|
||||
: "",
|
||||
});
|
||||
setIsActive(project.isActive);
|
||||
setSelectedColor(project.backgroundColor ?? "#A8E6CF");
|
||||
const backgroundColor = project.backgroundColor ?? "#A8E6CF";
|
||||
setSelectedBackground(findMatchingBackgroundPreset(backgroundColor));
|
||||
setSelectedColor(backgroundColor);
|
||||
setWorkspaceId(project.workspaceId);
|
||||
setExistingBackgroundPicture(project.backgroundPicture ?? "");
|
||||
setStartDateDefault(
|
||||
|
||||
Reference in New Issue
Block a user