mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 13:38:51 +00:00
Fix bug and optimized code
This commit is contained in:
@@ -57,8 +57,8 @@ const getValueUser = (user: TUser | null = null, prop: string): string => {
|
||||
|
||||
const searchQuery = (phone: string, sort: string, order: string) => {
|
||||
const phoneParams = phone ? 'phone_like=' + phone : '';
|
||||
const sortParams = sort ? '_sort=' + sort : '_sort=id';
|
||||
const orderParams = order ? '_order=' + order : '_order=asc';
|
||||
const sortParams = sort ? '_sort=' + sort : '';
|
||||
const orderParams = order ? '_order=' + order : '';
|
||||
const finalParam = [phoneParams, sortParams, orderParams];
|
||||
let query = '';
|
||||
let isFirstParam = true;
|
||||
|
||||
Reference in New Issue
Block a user