Skip to content

Commit

Permalink
fix: appId
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimSM committed Sep 21, 2023
1 parent 95ca207 commit c52c5a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/components/AppDetails/AppDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export const AppDetails = ({
versions={versions}
userGroups={userGroups}
onVersionInstall={onVersionInstall}
appId={appHubApp.id}
/>
</section>
</>
Expand Down
18 changes: 11 additions & 7 deletions src/components/AppDetails/Versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,25 @@ ChannelsFilter.propTypes = {
versions: PropTypes.array.isRequired,
}

const dataStoreQuery = {
groupVersions: {
resource: 'dataStore/app-management/capture',

}
};

const VersionsTable = ({
installedVersion,
versions,
onVersionInstall,
userGroups,
appId,
}) => {
const [userGroupVersionMap, setUserGroupVersionMap] = useReducer(
(map, newMap) => ({ ...map, ...newMap }),
{}
)

const dataStoreQuery = {
groupVersions: {
resource: 'dataStore/app-management/' + appId,

}
};

const { data: { groupVersions: dataStoreGroupVersions = {} } = {}, loading } = useDataQuery(dataStoreQuery);

if (loading) {
Expand Down Expand Up @@ -196,13 +197,15 @@ VersionsTable.propTypes = {
versions: PropTypes.array.isRequired,
onVersionInstall: PropTypes.func.isRequired,
installedVersion: PropTypes.string,
appId: PropTypes.string,
}

export const Versions = ({
installedVersion,
versions,
onVersionInstall,
userGroups,
appId,
}) => {
const [channelsFilter, setChannelsFilter] = useState(new Set(['stable']))
const installSuccessAlert = useAlert(i18n.t('App installed successfully'), {
Expand Down Expand Up @@ -262,6 +265,7 @@ export const Versions = ({
versions={filteredVersions}
onVersionInstall={handleVersionInstall}
userGroups={userGroups}
appId={appId}
/>
) : (
<em>
Expand Down

0 comments on commit c52c5a3

Please sign in to comment.