-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4b2bdf
commit f25a55a
Showing
27 changed files
with
105 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...nents/details/description/Description.tsx → ...ditional-info/description/Description.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const ADDITIONAL_INFO_DELAY_TIME = 2000; |
32 changes: 32 additions & 0 deletions
32
src/remote/api/requests/additional-info/additional-info.get.api.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { IAdditionalInfo } from '../../types/additional-info'; | ||
import { getRequest } from '../requests.api'; | ||
|
||
export const getCarSegment = async () => { | ||
const response = await getRequest<IAdditionalInfo[]>('/commoncode/segment'); | ||
|
||
return response; | ||
}; | ||
|
||
export const getCarType = async () => { | ||
const response = await getRequest<IAdditionalInfo[]>('/commoncode/cartype'); | ||
|
||
return response; | ||
}; | ||
|
||
export const getCarColor = async () => { | ||
const response = await getRequest<IAdditionalInfo[]>('/commoncode/color'); | ||
|
||
return response; | ||
}; | ||
|
||
export const getCarDriving = async () => { | ||
const response = await getRequest<IAdditionalInfo[]>('/commoncode/driving'); | ||
|
||
return response; | ||
}; | ||
|
||
export const getCarParking = async () => { | ||
const response = await getRequest<IAdditionalInfo[]>('/commoncode/parking'); | ||
|
||
return response; | ||
}; |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
src/remote/api/types/details.ts → src/remote/api/types/additional-info.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export interface IDetails { | ||
export interface IAdditionalInfo { | ||
codeNo: number | ||
codeName: string | ||
upperNo: number | ||
|
10 changes: 10 additions & 0 deletions
10
src/remote/queries/additional-info/car-details/useCarColor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { getCarColor } from '@remote/api/requests/additional-info/additional-info.get.api'; | ||
import { IAdditionalInfo } from '@remote/api/types/additional-info'; | ||
|
||
function useCarColor() { | ||
return useQuery<IAdditionalInfo[]>({ queryKey: ['car-color'], queryFn: getCarColor }); | ||
} | ||
|
||
export default useCarColor; |
10 changes: 10 additions & 0 deletions
10
src/remote/queries/additional-info/car-details/useCarDriving.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { getCarDriving } from '@remote/api/requests/additional-info/additional-info.get.api'; | ||
import { IAdditionalInfo } from '@remote/api/types/additional-info'; | ||
|
||
function useCarDriving() { | ||
return useQuery<IAdditionalInfo[]>({ queryKey: ['car-driving'], queryFn: getCarDriving }); | ||
} | ||
|
||
export default useCarDriving; |
10 changes: 10 additions & 0 deletions
10
src/remote/queries/additional-info/car-details/useCarParking.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { getCarParking } from '@remote/api/requests/additional-info/additional-info.get.api'; | ||
import { IAdditionalInfo } from '@remote/api/types/additional-info'; | ||
|
||
function useCarParking() { | ||
return useQuery<IAdditionalInfo[]>({ queryKey: ['car-parking'], queryFn: getCarParking }); | ||
} | ||
|
||
export default useCarParking; |
10 changes: 10 additions & 0 deletions
10
src/remote/queries/additional-info/car-details/useCarSegment.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { getCarSegment } from '@remote/api/requests/additional-info/additional-info.get.api'; | ||
import { IAdditionalInfo } from '@remote/api/types/additional-info'; | ||
|
||
function useCarSegment() { | ||
return useQuery<IAdditionalInfo[]>({ queryKey: ['car-segment'], queryFn: getCarSegment }); | ||
} | ||
|
||
export default useCarSegment; |
10 changes: 10 additions & 0 deletions
10
src/remote/queries/additional-info/car-details/useCarType.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useQuery } from '@tanstack/react-query'; | ||
|
||
import { getCarType } from '@remote/api/requests/additional-info/additional-info.get.api'; | ||
import { IAdditionalInfo } from '@remote/api/types/additional-info'; | ||
|
||
function useCarType() { | ||
return useQuery<IAdditionalInfo[]>({ queryKey: ['car-type'], queryFn: getCarType }); | ||
} | ||
|
||
export default useCarType; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters