Skip to content

Commit

Permalink
fix(update => at.vin): at.do to at.vin updated, removed instrumentati…
Browse files Browse the repository at this point in the history
…on, fix highlight
  • Loading branch information
crisner1978 committed Oct 10, 2023
1 parent 25ade7a commit c28c38d
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 25 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/primaryCoBuyer.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/primaryTrade.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
11 changes: 0 additions & 11 deletions instrumentation.ts

This file was deleted.

4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
return (
<>
<HighlightInit
excludedHostnames={['localhost']}
// excludedHostnames={['localhost']}
projectId={CONSTANTS.NEXT_PUBLIC_HIGHLIGHT_PROJECT_ID}
serviceName='credit-app'
tracingOrigins
Expand Down
4 changes: 2 additions & 2 deletions src/app/utils/airtable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const conciergeBase = 'app0ha03ugcl45qM1'

export const fromAirtable = async (base: string, table: string, id: string) => {
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}`,
},
Expand All @@ -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}` },
})

Expand Down
2 changes: 1 addition & 1 deletion src/app/utils/getATVehicleById.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/app/utils/getVehicleDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || ''
Expand Down
1 change: 0 additions & 1 deletion src/instrumentation.ts

This file was deleted.

1 comment on commit c28c38d

@vercel
Copy link

@vercel vercel bot commented on c28c38d Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks for Deployment have failed

Please sign in to comment.