0
Fork 0
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:
Xiao Yijun 2023-01-11 12:13:41 +08:00 committed by GitHub
parent 0216cf3696
commit cc70fa90cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View file

@ -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 }),

View file

@ -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}%` }),
});

View file

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

View file

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

View file

@ -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}%` }),
});