Add React imports to marketplace policy pages
This commit is contained in:
@@ -33,6 +33,7 @@ marketplace_tests:
|
|||||||
image: node:20-bookworm
|
image: node:20-bookworm
|
||||||
before_script:
|
before_script:
|
||||||
- npm ci
|
- npm ci
|
||||||
|
- npm run build --workspace @rentaldrivego/types
|
||||||
script:
|
script:
|
||||||
- npm run test:marketplace
|
- npm run test:marketplace
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
Vendored
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/types/routes.d.ts";
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// 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.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/types/routes.d.ts";
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// 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.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
Vendored
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/types/routes.d.ts";
|
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// 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'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
|
|
||||||
export default function AppPrivacyArPage() {
|
export default function AppPrivacyArPage() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
import FooterContentPage from '@/components/FooterContentPage'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
|
|
||||||
export default function AppPrivacyEnPage() {
|
export default function AppPrivacyEnPage() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
import FooterContentPage from '@/components/FooterContentPage'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
|
|
||||||
export default function AppPrivacyFrPage() {
|
export default function AppPrivacyFrPage() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
import FooterContentPage from '@/components/FooterContentPage'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
|
|
||||||
export default function AppTermsArPage() {
|
export default function AppTermsArPage() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
import FooterContentPage from '@/components/FooterContentPage'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
|
|
||||||
export default function AppTermsEnPage() {
|
export default function AppTermsEnPage() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
import FooterContentPage from '@/components/FooterContentPage'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
|
|
||||||
export default function AppTermsFrPage() {
|
export default function AppTermsFrPage() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
import { notFound } from 'next/navigation'
|
import { notFound } from 'next/navigation'
|
||||||
import FooterContentPage from '@/components/FooterContentPage'
|
import FooterContentPage from '@/components/FooterContentPage'
|
||||||
import { footerPageSlugs, isFooterPageSlug } from '@/lib/footerContent'
|
import { footerPageSlugs, isFooterPageSlug } from '@/lib/footerContent'
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import React from 'react'
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useMarketplacePreferences } from '@/components/MarketplaceShell'
|
import { useMarketplacePreferences } from '@/components/MarketplaceShell'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ describe('marketplace API helpers', () => {
|
|||||||
Object.defineProperty(globalThis, 'fetch', { configurable: true, value: fetchMock })
|
Object.defineProperty(globalThis, 'fetch', { configurable: true, value: fetchMock })
|
||||||
|
|
||||||
await expect(marketplaceFetch('/marketplace/vehicles')).resolves.toEqual([{ id: 'vehicle_1' }])
|
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 () => {
|
it('throws rich marketplace API errors', async () => {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ describe('renter client helpers', () => {
|
|||||||
|
|
||||||
clearRenterSession()
|
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',
|
method: 'POST',
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
}))
|
}))
|
||||||
@@ -44,7 +44,7 @@ describe('renter client helpers', () => {
|
|||||||
const { loadRenterProfile } = await import('./renter')
|
const { loadRenterProfile } = await import('./renter')
|
||||||
|
|
||||||
await expect(loadRenterProfile()).resolves.toEqual({ id: 'renter_1' })
|
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',
|
credentials: 'include',
|
||||||
headers: expect.objectContaining({ 'Content-Type': 'application/json' }),
|
headers: expect.objectContaining({ 'Content-Type': 'application/json' }),
|
||||||
}))
|
}))
|
||||||
@@ -70,7 +70,7 @@ describe('renter client helpers', () => {
|
|||||||
const body = [{ notificationType: 'reservation', channel: 'email', enabled: true }]
|
const body = [{ notificationType: 'reservation', channel: 'email', enabled: true }]
|
||||||
|
|
||||||
await expect(updateRenterPreferences(body)).resolves.toEqual({ success: 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',
|
method: 'PATCH',
|
||||||
body: JSON.stringify(body),
|
body: JSON.stringify(body),
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
Generated
+15
@@ -10743,6 +10743,21 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user