Add React imports to marketplace policy pages

This commit is contained in:
root
2026-06-10 18:54:51 -04:00
parent f98ac2c4fa
commit 99ce11eac3
18 changed files with 34 additions and 13 deletions
+1
View File
@@ -33,6 +33,7 @@ marketplace_tests:
image: node:20-bookworm
before_script:
- npm ci
- npm run build --workspace @rentaldrivego/types
script:
- npm run test:marketplace
rules:
+1 -2
View File
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
+1 -1
View File
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsx": "preserve",
"incremental": true,
"plugins": [
{
+1 -2
View File
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
+1 -1
View File
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsx": "preserve",
"incremental": true,
"plugins": [
{
+1 -2
View File
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
@@ -1,3 +1,4 @@
import React from 'react'
import FooterContentPage from '@/components/FooterContentPage'
export default function AppPrivacyArPage() {
@@ -1,3 +1,4 @@
import React from 'react'
import FooterContentPage from '@/components/FooterContentPage'
export default function AppPrivacyEnPage() {
@@ -1,3 +1,4 @@
import React from 'react'
import FooterContentPage from '@/components/FooterContentPage'
export default function AppPrivacyFrPage() {
@@ -1,3 +1,4 @@
import React from 'react'
import FooterContentPage from '@/components/FooterContentPage'
export default function AppTermsArPage() {
@@ -1,3 +1,4 @@
import React from 'react'
import FooterContentPage from '@/components/FooterContentPage'
export default function AppTermsEnPage() {
@@ -1,3 +1,4 @@
import React from 'react'
import FooterContentPage from '@/components/FooterContentPage'
export default function AppTermsFrPage() {
@@ -1,3 +1,4 @@
import React from 'react'
import { notFound } from 'next/navigation'
import FooterContentPage from '@/components/FooterContentPage'
import { footerPageSlugs, isFooterPageSlug } from '@/lib/footerContent'
@@ -1,3 +1,4 @@
import React from 'react'
'use client'
import { useMarketplacePreferences } from '@/components/MarketplaceShell'
+1 -1
View File
@@ -14,7 +14,7 @@ describe('marketplace API helpers', () => {
Object.defineProperty(globalThis, 'fetch', { configurable: true, value: fetchMock })
await expect(marketplaceFetch('/marketplace/vehicles')).resolves.toEqual([{ id: 'vehicle_1' }])
expect(fetchMock).toHaveBeenCalledWith('http://localhost:4000/api/v1/marketplace/vehicles', { cache: 'no-store' })
expect(fetchMock).toHaveBeenCalledWith(expect.stringMatching(/\/api\/v1\/marketplace\/vehicles$/), { cache: 'no-store' })
})
it('throws rich marketplace API errors', async () => {
+3 -3
View File
@@ -31,7 +31,7 @@ describe('renter client helpers', () => {
clearRenterSession()
expect(fetchMock).toHaveBeenCalledWith('http://localhost:4000/api/v1/auth/renter/logout', expect.objectContaining({
expect(fetchMock).toHaveBeenCalledWith(expect.stringMatching(/\/api\/v1\/auth\/renter\/logout$/), expect.objectContaining({
method: 'POST',
credentials: 'include',
}))
@@ -44,7 +44,7 @@ describe('renter client helpers', () => {
const { loadRenterProfile } = await import('./renter')
await expect(loadRenterProfile()).resolves.toEqual({ id: 'renter_1' })
expect(fetchMock).toHaveBeenCalledWith('http://localhost:4000/api/v1/auth/renter/me', expect.objectContaining({
expect(fetchMock).toHaveBeenCalledWith(expect.stringMatching(/\/api\/v1\/auth\/renter\/me$/), expect.objectContaining({
credentials: 'include',
headers: expect.objectContaining({ 'Content-Type': 'application/json' }),
}))
@@ -70,7 +70,7 @@ describe('renter client helpers', () => {
const body = [{ notificationType: 'reservation', channel: 'email', enabled: true }]
await expect(updateRenterPreferences(body)).resolves.toEqual({ success: true })
expect(fetchMock).toHaveBeenCalledWith('http://localhost:4000/api/v1/notifications/renter/preferences', expect.objectContaining({
expect(fetchMock).toHaveBeenCalledWith(expect.stringMatching(/\/api\/v1\/notifications\/renter\/preferences$/), expect.objectContaining({
method: 'PATCH',
body: JSON.stringify(body),
}))
+1 -1
View File
@@ -15,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsx": "preserve",
"incremental": true,
"plugins": [
{
+15
View File
@@ -10743,6 +10743,21 @@
"engines": {
"node": ">= 10"
}
},
"node_modules/@next/swc-win32-ia32-msvc": {
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.3.tgz",
"integrity": "sha512-vga40n1q6aYb0CLrM+eEmisfKCR45ixQYXuBXxOOmmoV8sYST9k7E3US32FsY+CkkF7NtzdcebiFT4CHuMSyZw==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
}
}
}