Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gpts.works #30

Open
wants to merge 2 commits into
base: gpts.works
Choose a base branch
from
Open
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
42 changes: 21 additions & 21 deletions web/app/(frontend)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { getRandRows, getRecommendedRows, getTotalCount } from "../models/gpts";
import { getRandRows, getRecommendedRows, getTotalCount } from '../models/gpts'

import Brand from "@/app/components/Brand";
import Categories from "@/app/components/Categories";
import { Gpts } from "@/app/types/gpts";
import GptsList from "@/app/components/GptsList";
import { Metadata } from "next";
import ProductHunt from "@/app/components/ProductHunt";
import Search from "@/app/components/Search";
import Tab from "../components/Tab";
import Tips from "@/app/components/Tips";
import { getPromotedGpts } from "../models/order";
import Brand from '@/app/components/Brand'
import Categories from '@/app/components/Categories'
import { Gpts } from '@/app/types/gpts'
import GptsList from '@/app/components/GptsList'
import { Metadata } from 'next'
import ProductHunt from '@/app/components/ProductHunt'
import Search from '@/app/components/Search'
import Tab from '../components/Tab'
import Tips from '@/app/components/Tips'
import { getPromotedGpts } from '../models/order'

export const maxDuration = 120;
export const maxDuration = 120

export async function generateMetadata(): Promise<Metadata> {
return {
title: "Featured GPTs in Third-party GPT store | GPTs Works",
title: 'Featured GPTs in Third-party GPT store | GPTs Works',
alternates: {
canonical: `${process.env.WEB_BASE_URI}`,
},
};
}
}

export default async () => {
const promoted_gpts = await getPromotedGpts();
const recommended_gpts = await getRecommendedRows(1, 100);
const promoted_gpts = await getPromotedGpts()
const recommended_gpts = await getRecommendedRows(1, 100)

const gpts_count = await getTotalCount();
const gpts_count = await getTotalCount()

return (
<>
Expand All @@ -37,10 +37,10 @@ export default async () => {
{/* <Categories activeSlug="featured" /> */}
<Tab />
{promoted_gpts && <GptsList gpts={promoted_gpts} loading={false} />}
{/* <div className="mx-auto max-w-7xl -mt-12">
<h2 className="text-center font-bold text-3xl">Top Used GPTs</h2>
{/* <div className="mx-auto -mt-12 max-w-7xl">
<h2 className="text-3xl font-bold text-center">Top Used GPTs</h2>
</div> */}
{recommended_gpts && <GptsList gpts={recommended_gpts} loading={false} />}
</>
);
};
)
}
10 changes: 4 additions & 6 deletions web/middleware.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { authMiddleware } from "@clerk/nextjs";
import { authMiddleware } from '@clerk/nextjs'

// This example protects all routes including api/trpc routes
// Please edit this to allow other routes to be public as needed.
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your Middleware
export default authMiddleware({});
export default authMiddleware({})

export const config = {
matcher: ["/(dashboard)(.*)", "/api/(dashboard)(.*)"],
};
matcher: ['/(dashboard)(.*)', '/api/(dashboard)(.*)'],
}