2
0

🐛 Fix typebot and folder name update in dashboard

Closes #1391
This commit is contained in:
Baptiste Arnaud
2024-03-26 19:27:21 +01:00
parent 1f158e78c9
commit a48a211509
3 changed files with 10 additions and 4 deletions

View File

@@ -192,5 +192,8 @@ export const ButtonSkeleton = () => (
export default memo( export default memo(
FolderButton, FolderButton,
(prev, next) => prev.folder.id === next.folder.id && prev.index === next.index (prev, next) =>
prev.folder.id === next.folder.id &&
prev.index === next.index &&
prev.folder.name === next.folder.name
) )

View File

@@ -194,7 +194,7 @@ export const FolderContent = ({ folder }: Props) => {
{folders && {folders &&
folders.map((folder, index) => ( folders.map((folder, index) => (
<FolderButton <FolderButton
key={folder.id.toString()} key={folder.id}
index={index} index={index}
folder={folder} folder={folder}
onFolderDeleted={refetchFolders} onFolderDeleted={refetchFolders}
@@ -205,7 +205,7 @@ export const FolderContent = ({ folder }: Props) => {
{typebots && {typebots &&
typebots.map((typebot) => ( typebots.map((typebot) => (
<TypebotButton <TypebotButton
key={typebot.id.toString()} key={typebot.id}
typebot={typebot} typebot={typebot}
draggedTypebot={draggedTypebot} draggedTypebot={draggedTypebot}
onTypebotUpdated={refetchTypebots} onTypebotUpdated={refetchTypebots}

View File

@@ -240,5 +240,8 @@ export default memo(
(prev, next) => (prev, next) =>
prev.draggedTypebot?.id === next.draggedTypebot?.id && prev.draggedTypebot?.id === next.draggedTypebot?.id &&
prev.typebot.id === next.typebot.id && prev.typebot.id === next.typebot.id &&
prev.isReadOnly === next.isReadOnly prev.isReadOnly === next.isReadOnly &&
prev.typebot.name === next.typebot.name &&
prev.typebot.icon === next.typebot.icon &&
prev.typebot.publishedTypebotId === next.typebot.publishedTypebotId
) )