Merge branch 'main' into develop

This commit is contained in:
Sherfin Shamsudeen 2021-08-24 17:27:20 +05:30
commit 8622ab5f8c
4 changed files with 7 additions and 2 deletions

View file

@ -231,6 +231,7 @@ class Table extends React.Component {
eventOptionUpdated={this.actionButtonEventOptionUpdated}
currentState={this.state.currentState}
extraData={{ actionButton: action, index: index }} // This data is returned in the callbacks
apps={this.props.apps}
/>
<button className="btn btn-sm btn-outline-danger col" onClick={() => this.removeAction(index)}>
Remove

View file

@ -51,7 +51,7 @@ export const EventSelector = ({
function getAllApps() {
let appsOptionsList = [];
apps.map((item) => {
apps.filter(item => item.slug != undefined).map((item) => {
appsOptionsList.push({
name: item.name,
value: item.slug

View file

@ -202,6 +202,7 @@ export const Inspector = ({
currentState={currentState}
darkMode={darkMode}
eventsChanged={eventsChanged}
apps={apps}
/>
}

View file

@ -16,7 +16,10 @@ export const appService = {
function getAll(page, folder) {
const requestOptions = { method: 'GET', headers: authHeader() };
return fetch(`${config.apiUrl}/apps?page=${page}&folder=${folder || ''}`, requestOptions).then(handleResponse);
if (page === 0)
return fetch(`${config.apiUrl}/apps`, requestOptions).then(handleResponse);
else
return fetch(`${config.apiUrl}/apps?page=${page}&folder=${folder || ''}`, requestOptions).then(handleResponse);
}
function createApp() {