feat(platform-web): carry detail source to analysis links
This commit is contained in:
@@ -103,24 +103,28 @@ export default function App() {
|
||||
}
|
||||
};
|
||||
|
||||
const openHistoryForVehicle = (vin: string) => {
|
||||
const openHistoryForVehicle = (vin: string, protocol?: string) => {
|
||||
const nextVin = vin.trim();
|
||||
const nextProtocol = protocol?.trim() ?? activeProtocol;
|
||||
if (!nextVin) {
|
||||
return;
|
||||
}
|
||||
setAnalysisVin(nextVin);
|
||||
setActiveProtocol(nextProtocol);
|
||||
setActivePage('history');
|
||||
replaceHash('history', nextVin, activeProtocol);
|
||||
replaceHash('history', nextVin, nextProtocol);
|
||||
};
|
||||
|
||||
const openMileageForVehicle = (vin: string) => {
|
||||
const openMileageForVehicle = (vin: string, protocol?: string) => {
|
||||
const nextVin = vin.trim();
|
||||
const nextProtocol = protocol?.trim() ?? activeProtocol;
|
||||
if (!nextVin) {
|
||||
return;
|
||||
}
|
||||
setAnalysisVin(nextVin);
|
||||
setActiveProtocol(nextProtocol);
|
||||
setActivePage('mileage');
|
||||
replaceHash('mileage', nextVin, activeProtocol);
|
||||
replaceHash('mileage', nextVin, nextProtocol);
|
||||
};
|
||||
|
||||
const updateVehicleDetailQuery = (keyword: string, protocol?: string) => {
|
||||
|
||||
Reference in New Issue
Block a user