Skip to content

Commit

Permalink
downgrade version because of latest nextjs 15 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
achris-alonzo30 committed Oct 30, 2024
1 parent 00b2ff2 commit 55126af
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 61 deletions.
Binary file modified bun.lockb
Binary file not shown.
13 changes: 0 additions & 13 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// Add performance optimizations
swcMinify: true,
compiler: {
// Disable React.memo usage check for better compilation speed
reactRemoveProperties: process.env.NODE_ENV === 'production',
removeConsole: process.env.NODE_ENV === 'production',
},
// Cache build outputs
experimental: {
turbotrace: {
logLevel: 'error'
}
},
env: {
MC_ID: process.env.MC_ID,
GA_ID: process.env.GA_ID,
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"convex": "^1.16.4",
"framer-motion": "^11.11.4",
"lucide-react": "^0.447.0",
"next": "latest",
"next": "14.2.14",
"next-themes": "^0.3.0",
"nextjs-toploader": "^3.7.15",
"react": "latest",
"react-dom": "latest",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.53.0",
"react-icons": "^5.3.0",
"react-intersection-observer": "^9.13.1",
Expand All @@ -49,14 +49,13 @@
"zod": "^3.23.8"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.14",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"eslint": "^8",
"eslint-config-next": "15.0.1"
}
}
18 changes: 8 additions & 10 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import dynamic from "next/dynamic";
import { CTA } from "@/features/landing-page/components/cta/CTA";
import { FAQ } from "@/features/landing-page/components/faq/FAQ";
import { Hero } from "@/features/landing-page/components/hero/Hero";

const BannerStacks = dynamic(() => import("@/features/landing-page/components/banner-stacks/BannerStacks"), { ssr: false });
const TimeComparisonTable = dynamic(() => import("@/features/landing-page/components/time-comparison-table/TimeComparisonTable"));
const Features = dynamic(() => import("@/features/landing-page/components/features/Features"));
const HowToUse = dynamic(() => import("@/features/landing-page/components/how-to-use/HowToUse"));
const Pricing = dynamic(() => import("@/features/landing-page/components/pricing/Pricing"), { ssr: false });
const Testimonials = dynamic(() => import("@/features/landing-page/components/testimonials/Testimonials"));
const FAQ = dynamic(() => import("@/features/landing-page/components/faq/FAQ"));
const CTA = dynamic(() => import("@/features/landing-page/components/cta/CTA"));
import { Pricing } from "@/features/landing-page/components/pricing/Pricing";
import { Features } from "@/features/landing-page/components/features/Features";
import { HowToUse } from "@/features/landing-page/components/how-to-use/HowToUse";
import { Testimonials } from "@/features/landing-page/components/testimonials/Testimonials";
import { BannerStacks } from "@/features/landing-page/components/banner-stacks/BannerStacks"
import { TimeComparisonTable } from "@/features/landing-page/components/time-comparison-table/TimeComparisonTable";

export default function Home() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const stacks = [
}
];

const BannerStacks = () => {
export const BannerStacks = () => {
return (
<section id="banner-stacks" className="relative overflow-hidden">
<MaxWidthWrapper className="relative z-20 flex items-center flex-col md:flex-row justify-center gap-6 py-10">
Expand All @@ -50,8 +50,6 @@ const BannerStacks = () => {
)
}

export default BannerStacks;

// Instructions
/*
This component displays logos of popular brands or companies that use your product. It serves to:
Expand Down
3 changes: 1 addition & 2 deletions src/features/landing-page/components/cta/CTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BuyButton } from "@/components/BuyButton"
import { MaxWidthWrapper } from "@/components/MaxWidthWrapper"


const CTA = () => {
export const CTA = () => {
return (
<section id="cta" className="relative overflow-hidden bg-neutral-900 border-t-3xl border-neutral-900">
<MaxWidthWrapper className="relative flex flex-col items-center justify-center space-y-6 py-20 md:py-30">
Expand All @@ -21,7 +21,6 @@ const CTA = () => {
)
}

export default CTA;

// TODO: If you're first launching your app by gathering waitlist emails, use this CTA
// export const CTA = () => {
Expand Down
4 changes: 1 addition & 3 deletions src/features/landing-page/components/faq/FAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const questions = [
];


const FAQ = () => {
export const FAQ = () => {
return (
<section className="px-4 py-12">
<MaxWidthWrapper>
Expand All @@ -83,8 +83,6 @@ const FAQ = () => {
);
};

export default FAQ;

const Question = ({
title,
children,
Expand Down
3 changes: 1 addition & 2 deletions src/features/landing-page/components/features/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Highlights = dynamic(() => import('./Highlights').then(mod => ({ default:
});


const Features = () => {
export const Features = () => {
return (
<section id="features" className="relative overflow-hidden">
<MaxWidthWrapper className="relative flex flex-col items-center py-20 md:py-32">
Expand Down Expand Up @@ -80,7 +80,6 @@ const Features = () => {
)
}

export default Features;

/**
* Features Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FaDatabase, FaRocket } from "react-icons/fa6";



export function Highlights() {
export const Highlights = () => {
const highlights = [
{
title: "Next.js Framework",
Expand Down
3 changes: 1 addition & 2 deletions src/features/landing-page/components/how-to-use/HowToUse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BuyButton } from "@/components/BuyButton";
import { ChipBanner } from "@/components/ChipBanner"
import { MaxWidthWrapper } from "@/components/MaxWidthWrapper"

const HowToUse = () => {
export const HowToUse = () => {
const ref = useRef<HTMLDivElement>(null);
const { scrollYProgress } = useScroll({
target: ref,
Expand Down Expand Up @@ -81,7 +81,6 @@ const HowToUse = () => {
)
}

export default HowToUse;

// Instructions
/*
Expand Down
3 changes: 1 addition & 2 deletions src/features/landing-page/components/pricing/Pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const packages = [
},
];

const Pricing = () => {
export const Pricing = () => {

return (
<section id="pricing" className="relative overflow-hidden">
Expand Down Expand Up @@ -121,7 +121,6 @@ const Pricing = () => {
)
}

export default Pricing;

// Instructions
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const VideoTestimonial = memo(({ isPlaying, isMuted, onPlayClick, onMuteClick }:
));
VideoTestimonial.displayName = 'VideoTestimonial';

const Testimonials = () => {
export const Testimonials = () => {
const [isPlaying, setIsPlaying] = useState(false);
const [isMuted, setIsMuted] = useState(false);
const videoRef = useRef<HTMLVideoElement>(null);
Expand Down Expand Up @@ -157,7 +157,7 @@ const Testimonials = () => {
<MaxWidthWrapper>
<div className="flex flex-col items-center justify-center mb-12 ">
<ChipBanner text="TESTIMONIALS" />
<h2 className="mt-4 text-3xl md:text-4xl lg:text-5xl font-bold">
<h2 className="mt-4 text-3xl md:text-4xl lg:text-5xl font-bold text-center">
Trusted by <span className="text-[#fcba28]">Amazing</span> People
</h2>
<p className="mt-4 text-lg text-foreground/80 max-w-2xl mx-auto">
Expand Down Expand Up @@ -220,5 +220,3 @@ const Testimonials = () => {
</section>
);
};

export default Testimonials;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const tasks = [
{ name: "Configuring analytics and monitoring", scratch: "4 hours", kit: "10 minutes" },
]

const TimeComparisonTable = () => {
export const TimeComparisonTable = () => {
const controls = useAnimation()
const ref = useRef(null)
const inView = useInView(ref, { once: true })
Expand Down Expand Up @@ -112,8 +112,6 @@ const TimeComparisonTable = () => {
)
}

export default TimeComparisonTable;

// Instructions
/*
This component creates a visually appealing section that highlights
Expand Down
4 changes: 1 addition & 3 deletions src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import {
convexAuthNextjsMiddleware,
} from "@convex-dev/auth/nextjs/server";


// TODO: Add all the routes that you want to be public
const isPublicRoute = createRouteMatcher(["/", "/auth", "/disclosure", "/privacy-policy"])
const isPublicRoute = createRouteMatcher(["/auth", "/"])

export default convexAuthNextjsMiddleware((req) => {
if (!isPublicRoute(req) && !isAuthenticatedNextjs()) {
Expand Down
24 changes: 19 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,9 +22,19 @@
}
],
"paths": {
"@/*": ["./src/*"]
}
"@/*": [
"./src/*"
]
},
"target": "ES2017"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 55126af

Please sign in to comment.