-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor, implementation of DataTables and restyle of multiple pages (#…
…1617) * wip(1584): Subscribers refactored, created generic hook for data tables and changed approach how data is handled in tables * wip: groups and subscriber tables refactored * feat: completed table restyle and refactor * feat: completed campaings table restyle and refactor * fix: fixed typo in subscribers header
- Loading branch information
1 parent
1a57319
commit 48afb6a
Showing
28 changed files
with
1,088 additions
and
1,240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REACT_APP_ENABLE_SOCIAL_AUTH=true | ||
REACT_APP_RECAPTCHA_SITE_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useApi } from "./" | ||
|
||
export const useCallApiDataTable = (endpoint) => { | ||
const [state, callApi] = useApi( | ||
{ | ||
url: endpoint, | ||
}, | ||
{ | ||
collection: [], | ||
init: true, | ||
} | ||
) | ||
|
||
const onClickPrev = () => { | ||
callApi({ | ||
url: state.data.links.previous, | ||
}) | ||
} | ||
|
||
const onClickNext = () => { | ||
callApi({ | ||
url: state.data.links.next, | ||
}) | ||
} | ||
|
||
return [callApi, state, onClickPrev, onClickNext] | ||
} |
Oops, something went wrong.