Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/scripts/fix-hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { readFileSync, writeFileSync } from "fs";

const filePath = "locales/.generated/client/hooks.tsx";
let content = readFileSync(filePath, "utf-8");

// Remove ArgsProps from import
content = content.replace(/,\s*type ArgsProps,\s*\n/g, ",\n");
content = content.replace(/type ArgsProps,\s*\n/g, "");

// Add ArgsProps definition after react import if not present
if (!content.includes("type ArgsProps = Record<string, string>")) {
content = content.replace(
/import { useState, useEffect, useMemo } from "react";/,
'import { useState, useEffect, useMemo } from "react";\n\ntype ArgsProps = Record<string, string>;'
);
}

writeFileSync(filePath, content);
8 changes: 4 additions & 4 deletions app/[lang]/(hyperjump)/case-studies/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export async function generateMetadata({
return dynamicOpengraph(meta);
}

export const generateStaticParams = async ({ params }: CaseStudyProps) => {
return getCaseStudies((await params).lang).reduce<Params[]>(
(acc, { slug }) => [
export const generateStaticParams = async (): Promise<Params[]> => {
return supportedLanguages.reduce<Params[]>(
(acc, lang) => [
...acc,
...supportedLanguages.map((lang) => ({ slug, lang }))
...getCaseStudies(lang).map(({ slug }) => ({ slug, lang }))
],
[]
);
Expand Down
14 changes: 10 additions & 4 deletions app/[lang]/(hyperjump)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
import ScrollObserver from "@/app/components/scroll-observer";
import type { SupportedLanguage } from "@/locales/.generated/types";
import {
supportedLanguages,
type SupportedLanguage
} from "@/locales/.generated/types";
import Footer from "./components/footer";
import LandingAIAgent from "./components/landing-ai-agent";
import Nav from "./components/nav";

type MainLangLayoutProps = {
children: React.ReactNode;
params: Promise<{ lang: SupportedLanguage }>;
params: Promise<{ lang: string }>;
};

export default async function MainLangLayout({
children,
params
}: MainLangLayoutProps) {
const { lang } = await params;
const supportedLang = supportedLanguages.includes(lang as SupportedLanguage)
? (lang as SupportedLanguage)
: "en";

return (
<>
<ScrollObserver />
<div className="relative min-h-screen bg-white">
<Nav lang={lang} />
<Nav lang={supportedLang} />
{children}
<LandingAIAgent />
<Footer lang={lang} />
<Footer lang={supportedLang} />
</div>
</>
);
Expand Down
8 changes: 4 additions & 4 deletions app/[lang]/(inferenceai)/inferenceai/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ type CaseStudyProps = {
params: Promise<Params>;
};

export const generateStaticParams = async ({ params }: CaseStudyProps) => {
return getCaseStudies((await params).lang).reduce<Params[]>(
(acc, { slug }) => [
export const generateStaticParams = async (): Promise<Params[]> => {
return supportedLanguages.reduce<Params[]>(
(acc, lang) => [
...acc,
...supportedLanguages.map((lang) => ({ slug, lang }))
...getCaseStudies(lang).map(({ slug }) => ({ slug, lang }))
],
[]
);
Expand Down
14 changes: 10 additions & 4 deletions app/[lang]/(inferenceai)/inferenceai/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
import ScrollObserver from "@/app/components/scroll-observer";
import type { SupportedLanguage } from "@/locales/.generated/types";
import {
supportedLanguages,
type SupportedLanguage
} from "@/locales/.generated/types";
import ClientWrapper from "./components/client-wrapper";
import { Footer } from "./components/footer";

type MainLangLayoutProps = {
children: React.ReactNode;
params: Promise<{ lang: SupportedLanguage }>;
params: Promise<{ lang: string }>;
};

export default async function MainLangLayout({
children,
params
}: MainLangLayoutProps) {
const { lang } = await params;
const supportedLang = supportedLanguages.includes(lang as SupportedLanguage)
? (lang as SupportedLanguage)
: "en";

return (
<>
<ScrollObserver />
<div className="relative min-h-screen bg-transparent">
<ClientWrapper lang={lang} />
<ClientWrapper lang={supportedLang} />
{children}
<Footer lang={lang} />
<Footer lang={supportedLang} />
</div>
</>
);
Expand Down
518 changes: 284 additions & 234 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const buttonVariants = cva(
);

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
extends
React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}
Expand Down
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"generate-redirect": "bun .github/scripts/generate-redirect.js",
"generate-sitemap": "bun .github/scripts/generate-sitemap.js",
"dev": "bun run generate-locales && next dev",
"build": "bun run generate-locales && next build",
"build": "bun run generate-locales && bun .github/scripts/fix-hooks.ts && next build",
"postbuild": "bun run generate-sitemap && bun run generate-redirect",
"start": "bunx serve out",
"lint": "next lint",
Expand All @@ -22,8 +22,8 @@
"@mdx-js/loader": "3.1.1",
"@mdx-js/react": "3.1.1",
"@n8n/chat": "0.61.0",
"@next/mdx": "15.5.6",
"@next/third-parties": "15.5.6",
"@next/mdx": "16.0.7",
"@next/third-parties": "16.0.7",
"@radix-ui/react-accordion": "1.2.12",
"@radix-ui/react-aspect-ratio": "1.1.7",
"@radix-ui/react-avatar": "1.1.10",
Expand All @@ -39,10 +39,10 @@
"framer-motion": "12.23.24",
"lucide-react": "0.546.0",
"marked": "16.4.1",
"next": "15.4.1",
"next": "16.0.7",
"next-themes": "0.4.6",
"react": "19.2.0",
"react-dom": "19.2.0",
"react": "19",
"react-dom": "19",
"rehype-stringify": "10.0.1",
"remark-gfm": "4.0.1",
"remark-parse": "11.0.0",
Expand All @@ -59,17 +59,20 @@
"@tailwindcss/typography": "^0.5.16",
"@types/mdx": "^2.0.13",
"@types/node": "^24",
"@types/react": "19.1.13",
"@types/react-dom": "19.1.9",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"eslint": "^8",
"eslint-config-next": "^15.5.4",
"eslint-config-next": "16.0.7",
"playwright": "^1.56.1",
"postcss": "^8",
"prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"simple-i18n-next": "0.0.25",
"simple-i18n-next": "^0.0.38",
"tailwind-merge": "^3.3.1",
"tailwindcss": "^4.1.13",
"typescript": "^5"
"typescript": "^5.9.3"
},
"volta": {
"node": "20.19.6"
}
}
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"incremental": true,
"plugins": [
{
Expand All @@ -28,7 +28,8 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"locales/.generated/**/*"
"locales/.generated/**/*",
".next/dev/types/**/*.ts"
],
"exclude": ["node_modules"]
}