Skip to content

Commit

Permalink
further dependency upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
jthrilly committed Nov 13, 2024
1 parent 542387a commit 91aea5b
Show file tree
Hide file tree
Showing 11 changed files with 658 additions and 334 deletions.
2 changes: 1 addition & 1 deletion apps/documentation/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { LayoutComponent } from '~/components/Layout';
import { ThemeProvider } from '~/components/Providers/theme-provider';
import { GoogleAnalytics } from '@next/third-parties/google';
import { Analytics } from '@vercel/analytics/react';
import { env } from '~/env.mjs';
import { env } from '~/env';

const quicksand = Quicksand({
weight: ['300', '400', '500', '600', '700'],
Expand Down
2 changes: 1 addition & 1 deletion apps/documentation/components/DocSearchComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { DocSearch } from '@docsearch/react';
import { useLocale, useTranslations } from 'next-intl';
import '@docsearch/css';
import { env } from '~/env.mjs';
import { env } from '~/env';
import { inputVariants } from '@codaco/ui';
import { Search } from 'lucide-react';
import { cn } from '~/lib/utils';
Expand Down
6 changes: 4 additions & 2 deletions apps/documentation/components/Providers/theme-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use client';

import * as React from 'react';
import { ThemeProvider as NextThemesProvider } from 'next-themes';
import { type ThemeProviderProps } from 'next-themes/dist/types';
import {
ThemeProvider as NextThemesProvider,
type ThemeProviderProps,
} from 'next-themes';

export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
Expand Down
11 changes: 8 additions & 3 deletions apps/documentation/components/ai-assistant.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';

import { env } from '~/env.mjs';
import { MendableInPlace } from '@mendable/search';
import { env } from '~/env';
import { useTranslations } from 'next-intl';
import {
Dialog,
Expand All @@ -17,6 +16,12 @@ import {
import { cn } from '~/lib/utils';
import { motion } from 'framer-motion';
import { useEffect, useRef } from 'react';
import dynamic from 'next/dynamic';

const MendableSearch = dynamic(
() => import('@mendable/search').then((modules) => modules.MendableInPlace),
{ ssr: false, loading: () => null },
);

const TriggerButton = () => {
const ref = useRef<HTMLDivElement>(null);
Expand Down Expand Up @@ -77,7 +82,7 @@ const AIAssistant = () => {
</DialogTrigger>
<DialogContentEmpty>
<div className={cn(dialogContentClasses)}>
<MendableInPlace
<MendableSearch
style={{ darkMode: false, accentColor: '#5259eb' }}
anon_key={env.NEXT_PUBLIC_MENDABLE_ANON_KEY}
hintText={t('dialogPlaceholder')}
Expand Down
6 changes: 4 additions & 2 deletions apps/documentation/env.mjs → apps/documentation/env.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint-disable no-process-env */
import { createEnv } from '@t3-oss/env-nextjs';
import { config } from 'dotenv'

import { z } from 'zod';
// import dotenv from 'dotenv';

// dotenv.config();
config()

export const env = createEnv({
/**
Expand Down Expand Up @@ -46,4 +47,5 @@ export const env = createEnv({
NEXT_PUBLIC_GA_ID: process.env.NEXT_PUBLIC_GA_ID,
NODE_ENV: process.env.NODE_ENV,
},
skipValidation: true,
});
2 changes: 1 addition & 1 deletion apps/documentation/lib/helper_functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
SidebarProject,
} from '~/app/types';
import { MetadataFileSchema } from '~/app/types';
import { env } from '~/env.mjs';
import { env } from '~/env';

export const relativePathToDocs = join(
process.cwd(),
Expand Down
3 changes: 0 additions & 3 deletions apps/documentation/lib/writeSidebarJson.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { readdirSync, readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import type fs from 'node:fs';
import dotenv from 'dotenv';
import matter from 'gray-matter';
import type { Locale, TSideBar } from '~/app/types';
import { locales } from '~/app/types';
Expand All @@ -16,8 +15,6 @@ import {
sortDirectoryListing,
} from './helper_functions';

dotenv.config();

/**
* Generate sidebar data based on docs and locales.
*/
Expand Down
8 changes: 4 additions & 4 deletions apps/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-navigation-menu": "^1.2.1",
"@radix-ui/react-popover": "^1.1.2",
"@t3-oss/env-nextjs": "^0.10.1",
"@t3-oss/env-nextjs": "^0.11.1",
"@tailwindcss/container-queries": "^0.1.1",
"@vercel/analytics": "^1.4.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"dotenv": "^16.4.5",
"framer-motion": "^11.11.15",
"lucide-react": "^0.399.0",
"lucide-react": "^0.456.0",
"next": "^14.2.17",
"next-intl": "^3.25.1",
"next-themes": "^0.3.0",
"next-themes": "^0.4.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand All @@ -54,7 +54,7 @@
"hast-util-to-string": "^3.0.1",
"mdast-util-to-string": "^4.0.0",
"next-sitemap": "^4.2.3",
"prettier": "^3.3.2",
"prettier": "^3.3.3",
"rehype-highlight": "^7.0.1",
"rehype-raw": "^7.0.0",
"rehype-react": "^8.0.0",
Expand Down
128 changes: 64 additions & 64 deletions apps/documentation/public/sitemap-0.xml

Large diffs are not rendered by default.

Loading

0 comments on commit 91aea5b

Please sign in to comment.