diff --git a/apps/app/src/pages/org/[slug]/[orgLocationId]/edit/[orgServiceId].tsx b/apps/app/src/pages/org/[slug]/[orgLocationId]/edit/[orgServiceId].tsx index f47acd9c21..ae142e0d69 100644 --- a/apps/app/src/pages/org/[slug]/[orgLocationId]/edit/[orgServiceId].tsx +++ b/apps/app/src/pages/org/[slug]/[orgLocationId]/edit/[orgServiceId].tsx @@ -1,12 +1,12 @@ -import { createStyles, Grid, rem, Stack } from '@mantine/core' +import { Grid, Stack } from '@mantine/core' import dynamic from 'next/dynamic' import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' import { type GetServerSideProps } from 'nextjs-routes' import { type ReactNode, Suspense, useEffect, useState } from 'react' -import { type Path, useFieldArray, useForm } from 'react-hook-form' +import { /*type Path,*/ useFieldArray, useForm } from 'react-hook-form' import { Textarea, TextInput } from 'react-hook-form-mantine' -import { type Merge } from 'type-fest' +// import { type Merge } from 'type-fest' import { z } from 'zod' import { prefixedId } from '@weareinreach/api/schemas/idPrefix' @@ -31,8 +31,7 @@ const FreetextObject = z }) .nullish() -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type MapValue = A extends Map ? V : never +// type MapValue = A extends Map ? V : never const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]) type Literal = z.infer @@ -95,10 +94,10 @@ const EditServicePage = () => { const activeServices = form.watch('services') ?? [] type AttrSectionKeys = 'clientsServed' | 'cost' | 'eligibility' | 'languages' | 'additionalInfo' - type AttrSectionVals = Merge< - FormSchemaType['attributes'][number], - { _rhfName: Path; _rhfLabel: string } - > + // type AttrSectionVals = Merge< + // FormSchemaType['attributes'][number], + // { _rhfName: Path; _rhfLabel: string } + // > const attributeBase: { [key in AttrSectionKeys]: ReactNode[] @@ -264,7 +263,7 @@ export const getServerSideProps: GetServerSideProps = async ({ locale, params, r }) .safeParse(params) if (!urlParams.success) return { notFound: true } - const { slug, orgLocationId, orgServiceId } = urlParams.data + const { slug, orgLocationId: _, orgServiceId } = urlParams.data const session = await checkServerPermissions({ ctx: { req, res }, permissions: ['dataPortalBasic'], diff --git a/apps/app/src/pages/org/[slug]/[orgLocationId]/index.tsx b/apps/app/src/pages/org/[slug]/[orgLocationId]/index.tsx index 438c8c497b..0e42aa3fae 100644 --- a/apps/app/src/pages/org/[slug]/[orgLocationId]/index.tsx +++ b/apps/app/src/pages/org/[slug]/[orgLocationId]/index.tsx @@ -1,4 +1,4 @@ -import { createStyles, Divider, Grid, Skeleton, Stack, Tabs, useMantineTheme } from '@mantine/core' +import { createStyles, Divider, Grid, Stack, Tabs, useMantineTheme } from '@mantine/core' import { useMediaQuery } from '@mantine/hooks' // import compact from 'just-compact' import { type GetStaticPaths, type GetStaticPropsContext, type NextPage } from 'next' diff --git a/apps/app/src/pages/org/[slug]/index.tsx b/apps/app/src/pages/org/[slug]/index.tsx index 0f78215ad4..7f33be4a0b 100644 --- a/apps/app/src/pages/org/[slug]/index.tsx +++ b/apps/app/src/pages/org/[slug]/index.tsx @@ -1,4 +1,4 @@ -import { createStyles, Divider, Grid, Skeleton, Stack, Tabs, useMantineTheme } from '@mantine/core' +import { createStyles, Divider, Grid, Stack, Tabs, useMantineTheme } from '@mantine/core' import { useElementSize, useMediaQuery } from '@mantine/hooks' import { type GetStaticPaths, type GetStaticPropsContext, type InferGetStaticPropsType } from 'next' import dynamic from 'next/dynamic' diff --git a/apps/app/src/providers/index.tsx b/apps/app/src/providers/index.tsx index b3e78a2836..33aa6e2479 100644 --- a/apps/app/src/providers/index.tsx +++ b/apps/app/src/providers/index.tsx @@ -1,12 +1,12 @@ 'use client' import { MantineProvider } from '@mantine/core' -import dynamic, { type LoaderComponent } from 'next/dynamic' -import { Noto_Color_Emoji, Work_Sans } from 'next/font/google' +// import dynamic, { type LoaderComponent } from 'next/dynamic' +import { /*Noto_Color_Emoji,*/ Work_Sans } from 'next/font/google' import { type Session } from 'next-auth' import { SessionProvider } from 'next-auth/react' -import { Trans, useTranslation } from 'next-i18next' -import { type ComponentPropsWithoutRef, useMemo } from 'react' -import { type ConsentBanner, type ConsentOptions } from 'react-hook-consent' +// import { Trans, useTranslation } from 'next-i18next' +// import { type ComponentPropsWithoutRef, useMemo } from 'react' +// import { type ConsentBanner, type ConsentOptions } from 'react-hook-consent' import { EditModeProvider } from '@weareinreach/ui/providers/EditMode' import { GoogleMapsProvider } from '@weareinreach/ui/providers/GoogleMaps' @@ -14,7 +14,7 @@ import { SearchStateProvider } from '@weareinreach/ui/providers/SearchState' import { appCache, appTheme } from '@weareinreach/ui/theme' import 'react-hook-consent/dist/styles/style.css' -const fallbackEmoji = Noto_Color_Emoji({ weight: '400', subsets: ['emoji'] }) +// const fallbackEmoji = Noto_Color_Emoji({ weight: '400', subsets: ['emoji'] }) const fontWorkSans = Work_Sans({ subsets: ['latin-ext'], @@ -33,68 +33,68 @@ const fontWorkSans = Work_Sans({ ], }) -const PrivacyStatementModal = dynamic( - () => - import('@weareinreach/ui/modals/PrivacyStatement').then( - (mod) => mod.PrivacyStatementModal - ) satisfies LoaderComponent -) -const Link = dynamic(() => import('@weareinreach/ui/components/core/Link').then((mod) => mod.Link)) +// const PrivacyStatementModal = dynamic( +// () => +// import('@weareinreach/ui/modals/PrivacyStatement').then( +// (mod) => mod.PrivacyStatementModal +// ) satisfies LoaderComponent +// ) +// const Link = dynamic(() => import('@weareinreach/ui/components/core/Link').then((mod) => mod.Link)) export const Providers = ({ children, session }: ProviderProps) => { - const { t } = useTranslation('common') + // const { t } = useTranslation('common') - const consentOptions: ConsentOptions = useMemo( - () => ({ - services: [ - { - id: 'basic', - name: t('cookie-consent.item-basic'), - mandatory: true, - }, - { - id: 'ga4', - name: t('cookie-consent.item-ga4'), - scripts: [ - { - id: 'ga4-consent', - code: `window.gtag && window.gtag('consent', 'update', {ad_storage: 'granted', analytics_storage: 'granted'})`, - }, - ], - }, - ], - theme: 'light', - }), - [t] - ) + // const consentOptions: ConsentOptions = useMemo( + // () => ({ + // services: [ + // { + // id: 'basic', + // name: t('cookie-consent.item-basic'), + // mandatory: true, + // }, + // { + // id: 'ga4', + // name: t('cookie-consent.item-ga4'), + // scripts: [ + // { + // id: 'ga4-consent', + // code: `window.gtag && window.gtag('consent', 'update', {ad_storage: 'granted', analytics_storage: 'granted'})`, + // }, + // ], + // }, + // ], + // theme: 'light', + // }), + // [t] + // ) - const consentBannerSettings: ConsentBannerOpts = useMemo( - () => ({ - settings: { - modal: { - title: t('cookie-consent.modal-title'), - approve: { label: t('cookie-consent.approve-selected') }, - approveAll: { label: t('cookie-consent.approve-all') }, - decline: { label: t('words.decline') }, - description: ( - This is a dynamic component */ - - ), - }} - /> - ), - }, - label: t('words.customize'), - }, - approve: { label: t('words.accept') }, - decline: { label: t('words.decline') }, - }), - [t] - ) + // const consentBannerSettings: ConsentBannerOpts = useMemo( + // () => ({ + // settings: { + // modal: { + // title: t('cookie-consent.modal-title'), + // approve: { label: t('cookie-consent.approve-selected') }, + // approveAll: { label: t('cookie-consent.approve-all') }, + // decline: { label: t('words.decline') }, + // description: ( + // This is a dynamic component */ + // + // ), + // }} + // /> + // ), + // }, + // label: t('words.customize'), + // }, + // approve: { label: t('words.accept') }, + // decline: { label: t('words.decline') }, + // }), + // [t] + // ) return ( +// type ConsentBannerOpts = ComponentPropsWithoutRef