mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
refactor(console): parse number to string by String()
(#2902)
This commit is contained in:
parent
0216cf3696
commit
cc70fa90cd
5 changed files with 10 additions and 10 deletions
|
@ -39,8 +39,8 @@ const AuditLogTable = ({ userId, className }: Props) => {
|
|||
const applicationId = query.get('applicationId');
|
||||
|
||||
const url = buildUrl('/api/logs', {
|
||||
page: `${pageIndex}`,
|
||||
page_size: `${pageSize}`,
|
||||
page: String(pageIndex),
|
||||
page_size: String(pageSize),
|
||||
...conditional(event && { logType: event }),
|
||||
...conditional(applicationId && { applicationId }),
|
||||
...conditional(userId && { userId }),
|
||||
|
|
|
@ -47,8 +47,8 @@ const SourceUsersBox = ({ roleId, selectedUsers, onAddUser, onRemoveUser }: Prop
|
|||
const url = buildUrl('/api/users', {
|
||||
excludeRoleId: roleId,
|
||||
hideAdminUser: 'true',
|
||||
page: `${pageIndex}`,
|
||||
page_size: `${pageSize}`,
|
||||
page: String(pageIndex),
|
||||
page_size: String(pageSize),
|
||||
...conditional(keyword && { search: `%${keyword}%` }),
|
||||
});
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ const ApiResources = () => {
|
|||
const pageIndex = Number(query.get('page') ?? '1');
|
||||
|
||||
const url = buildUrl('/api/resources', {
|
||||
page: `${pageIndex}`,
|
||||
page_size: `${pageSize}`,
|
||||
page: String(pageIndex),
|
||||
page_size: String(pageSize),
|
||||
});
|
||||
|
||||
const { data, error, mutate } = useSWR<[Resource[], number], RequestError>(url);
|
||||
|
|
|
@ -37,8 +37,8 @@ const Applications = () => {
|
|||
const search = query.toString();
|
||||
const pageIndex = Number(query.get('page') ?? '1');
|
||||
const url = buildUrl('/api/applications', {
|
||||
page: `${pageIndex}`,
|
||||
page_size: `${pageSize}`,
|
||||
page: String(pageIndex),
|
||||
page_size: String(pageSize),
|
||||
});
|
||||
|
||||
const { data, error, mutate } = useSWR<[Application[], number], RequestError>(url);
|
||||
|
|
|
@ -45,8 +45,8 @@ const Users = () => {
|
|||
|
||||
const url = buildUrl('/api/users', {
|
||||
hideAdminUser: 'true',
|
||||
page: `${pageIndex}`,
|
||||
page_size: `${pageSize}`,
|
||||
page: String(pageIndex),
|
||||
page_size: String(pageSize),
|
||||
...conditional(keyword && { search: `%${keyword}%` }),
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue