Skip to content

Commit 9d17f0e

Browse files
authored
fix(app marketplace): fix updating favorites (eclipse-tractusx#1345)
1 parent 4ddb929 commit 9d17f0e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
### Bugfixes
6+
7+
- **App Marketplace**
8+
- fixed updating of favorites in app marketplace [#1345](https://github.com/eclipse-tractusx/portal-frontend/pull/1345)
9+
510
## 2.3.0-RC4
611

712
### Change

src/components/pages/AppMarketplace/components/AppListSection/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export default function AppListSection() {
5151
const dispatch = useDispatch<AppDispatch>()
5252
const navigate = useNavigate()
5353
const { data, error, isError, refetch } = useFetchActiveAppsQuery()
54-
const { data: favoriteItems } = useFetchFavoriteAppsQuery()
54+
const { data: favoriteItems, refetch: refetchFavoriteApps } =
55+
useFetchFavoriteAppsQuery()
5556
const control = useSelector(appsControlSelector)
5657
const [list, setList] = useState<AppMarketplaceApp[]>([])
5758
const [favList, setFavlist] = useState<string[]>([])
@@ -94,6 +95,7 @@ export default function AppListSection() {
9495
const d = cloneDeep(data)
9596
arrangeDataList(d, favoriteItems)
9697
}
98+
refetchFavoriteApps()
9799
}, [data, favoriteItems])
98100

99101
const renderProgress = () => (

0 commit comments

Comments
 (0)