refactor: notification pagination & made context for handling functions related to notification (#1654)
* refactor: add pagination and notification context * refactor: moved header & snooze option to their own files added check before toUpperCase function
This commit is contained in:
parent
10059b2150
commit
9c28011ea5
11 changed files with 847 additions and 283 deletions
|
|
@ -112,3 +112,13 @@ export const getNumberCount = (number: number): string => {
|
|||
}
|
||||
return number.toString();
|
||||
};
|
||||
|
||||
export const objToQueryParams = (obj: any) => {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
if (value !== undefined && value !== null) params.append(key, value as string);
|
||||
}
|
||||
|
||||
return params.toString();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue