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:
Dakshesh Jain 2023-07-26 12:02:14 +05:30 committed by GitHub
parent 10059b2150
commit 9c28011ea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 847 additions and 283 deletions

View file

@ -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();
};