mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: pages access mutation (#896)
This commit is contained in:
parent
7149d20601
commit
4f61c5d552
@ -166,17 +166,17 @@ export const PagesView: React.FC<Props> = ({ pages, viewType }) => {
|
|||||||
|
|
||||||
mutate<IPage[]>(
|
mutate<IPage[]>(
|
||||||
ALL_PAGES_LIST(projectId as string),
|
ALL_PAGES_LIST(projectId as string),
|
||||||
(prevData) => (prevData ?? []).map((p) => ({ ...p, ...formData })),
|
(prevData) => (prevData ?? []).map((p) => ({ ...p, ...(p.id === page.id ? formData : {}) })),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
mutate<IPage[]>(
|
mutate<IPage[]>(
|
||||||
MY_PAGES_LIST(projectId as string),
|
MY_PAGES_LIST(projectId as string),
|
||||||
(prevData) => (prevData ?? []).map((p) => ({ ...p, ...formData })),
|
(prevData) => (prevData ?? []).map((p) => ({ ...p, ...(p.id === page.id ? formData : {}) })),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
mutate<IPage[]>(
|
mutate<IPage[]>(
|
||||||
FAVORITE_PAGES_LIST(projectId as string),
|
FAVORITE_PAGES_LIST(projectId as string),
|
||||||
(prevData) => (prevData ?? []).map((p) => ({ ...p, ...formData })),
|
(prevData) => (prevData ?? []).map((p) => ({ ...p, ...(p.id === page.id ? formData : {}) })),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ export const PagesView: React.FC<Props> = ({ pages, viewType }) => {
|
|||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
) : viewType === "detailed" ? (
|
) : viewType === "detailed" ? (
|
||||||
<div className="rounded-[10px] border divide-y border-gray-200 bg-white">
|
<div className="divide-y rounded-[10px] border border-gray-200 bg-white">
|
||||||
{pages.map((page) => (
|
{pages.map((page) => (
|
||||||
<SinglePageDetailedItem
|
<SinglePageDetailedItem
|
||||||
key={page.id}
|
key={page.id}
|
||||||
|
Loading…
Reference in New Issue
Block a user