diff --git a/cypress/e2e/primaryCoBuyer.cy.ts b/cypress/e2e/primaryCoBuyer.cy.ts index 2e19884..2e62571 100644 --- a/cypress/e2e/primaryCoBuyer.cy.ts +++ b/cypress/e2e/primaryCoBuyer.cy.ts @@ -84,9 +84,9 @@ describe('Primary with CoBuyer Credit App', () => { // Vehicle of Interest cy.getInput('vehicleVin') - .type('1G6KF5RS9HU110366') + .type('1C4RJFBG2MC686287') .then(() => { - cy.getInput('vehicleYear').should('have.value', 2017) + cy.getInput('vehicleYear').should('have.value', 2021) }) cy.getInput('vehicleCashDown').type('1000') cy.getInput('vehiclePrice').type('20000') diff --git a/cypress/e2e/primaryTrade.cy.ts b/cypress/e2e/primaryTrade.cy.ts index e45cedb..1eb6e9e 100644 --- a/cypress/e2e/primaryTrade.cy.ts +++ b/cypress/e2e/primaryTrade.cy.ts @@ -52,9 +52,9 @@ describe('Primary with Trade Credit App', () => { // Vehicle of Interest cy.getInput('vehicleVin') - .type('1G6KF5RS9HU110366') + .type('1C4RJFBG2MC686287') .then(() => { - cy.getInput('vehicleYear').should('have.value', 2017) + cy.getInput('vehicleYear').should('have.value', 2021) }) cy.getInput('vehicleCashDown').type('1000') cy.getInput('vehiclePrice').type('20000') diff --git a/instrumentation.ts b/instrumentation.ts deleted file mode 100644 index f2d5504..0000000 --- a/instrumentation.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CONSTANTS } from "@/app/constants"; - -export async function register() { - if (process.env.NEXT_RUNTIME === 'nodejs') { - - const { registerHighlight } = await import('@highlight-run/next/server') - registerHighlight({ - projectID: CONSTANTS.NEXT_PUBLIC_HIGHLIGHT_PROJECT_ID, - }) - } -} \ No newline at end of file diff --git a/next.config.js b/next.config.js index 96802f3..17a6246 100644 --- a/next.config.js +++ b/next.config.js @@ -7,9 +7,9 @@ const nextConfig = { generateBuildId: () => nextBuildId({ dir: __dirname }), experimental: { serverActions: true, - instrumentationHook: true, + // instrumentationHook: true, }, - productionBrowserSourceMaps: true + productionBrowserSourceMaps: true, } module.exports = withHighlightConfig(nextConfig) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 445e766..b5c45b4 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -15,7 +15,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) return ( <> { - const d = await fetch(`https://drivly.airtable.do/${base}/${table}/${id}`, { + const d = await fetch(`https://airtable.vin/${base}/${table}/${id}`, { headers: { Authorization: `Bearer ${process.env.VIN_UNIVERSE_KEY}`, }, @@ -13,7 +13,7 @@ export const fromAirtable = async (base: string, table: string, id: string) => { } export const searchAirtable = async (base: string, table: string, query: string) => { - const d = await fetch(`https://drivly.airtable.do/${base}/${table}?filterByFormula=${query}`, { + const d = await fetch(`https://airtable.vin/${base}/${table}?filterByFormula=${query}`, { headers: { Authorization: `Bearer ${process.env.VIN_UNIVERSE_KEY}` }, }) diff --git a/src/app/utils/getATVehicleById.ts b/src/app/utils/getATVehicleById.ts index 80f049b..506868b 100644 --- a/src/app/utils/getATVehicleById.ts +++ b/src/app/utils/getATVehicleById.ts @@ -4,7 +4,7 @@ import { conciergeBase, fromAirtable } from './airtable' import { VehicleDetailProps } from './getVehicleDetails' export async function getATVehicleById(id: string) { - const data = await fromAirtable(conciergeBase, 'Vehicles', `rec${id}`) + const data = await fromAirtable('CRM', 'Vehicles', `rec${id}`) const price = findAirtablePrice(data) return { diff --git a/src/app/utils/getVehicleDetails.ts b/src/app/utils/getVehicleDetails.ts index 1b3290a..0653745 100644 --- a/src/app/utils/getVehicleDetails.ts +++ b/src/app/utils/getVehicleDetails.ts @@ -49,10 +49,10 @@ export async function getVehicleDetails(id: string) { } export const fetchPrice = async (id: string) => { - const data = await searchAirtable(conciergeBase, 'Vehicles', `AND({VIN}='${id}')`) - if (!data?.records?.length) return null + const data = await searchAirtable('CRM', 'Vehicles', `AND({VIN}='${id}')`) + if (!data?.length) return null - const highestPricedRecord = findHighestPricedRecord(data?.records) + const highestPricedRecord = findHighestPricedRecord(data) const salesPrice = highestPricedRecord?.salesPrice || '' const buyNow = highestPricedRecord?.buyNow || '' const retailPrice = highestPricedRecord?.retailPrice || '' diff --git a/src/instrumentation.ts b/src/instrumentation.ts deleted file mode 100644 index f762ba2..0000000 --- a/src/instrumentation.ts +++ /dev/null @@ -1 +0,0 @@ -export { register } from '../instrumentation'