diff --git a/apps/blogai/app/[locale]/page.tsx b/apps/blogai/app/[locale]/page.tsx index cc8a00a..72e6f79 100644 --- a/apps/blogai/app/[locale]/page.tsx +++ b/apps/blogai/app/[locale]/page.tsx @@ -7,7 +7,6 @@ import { auth } from '@/auth' import { Header } from '@/components/header' import { Footer, Footer_bak } from '@/components/footer' -// import { Web3Provider } from '@/components/providers/web3-provider' import { Metadata } from 'next' import { useTranslation, Trans } from "next-i18next"; @@ -18,14 +17,6 @@ import { PromptFormIndex } from '@/components/prompt-index' import { ChatModel } from '@/components/chat-model' - - -// system:系统角色 ,用来设置机器人的行为 -// user:用户角色,和AI对话的用户 -// assistant:助理角色,AI机器人 - -// {"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."}, -// {"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."} const initialMessages: Message[] = [ { id: nanoid(), @@ -127,18 +118,11 @@ export const metadata: Metadata = { } } -// const i18nNamespaces = ['common', 'home']; - export default async function ChatIndexPage({ params: { locale } }: { params: { locale: string } }) { const session = await auth() const avatarUrl = session?.user?.image const id = nanoid() - - - // const { t, resources } = await initTranslations(locale, i18nNamespaces); - - return ( <> {/* */} @@ -155,7 +139,7 @@ export default async function ChatIndexPage({ params: { locale } }: { params: { -
+ {/*
{/* */} -
+ /> } +
*/} diff --git a/apps/blogai/auth.ts b/apps/blogai/auth.ts index 2790316..a196a41 100644 --- a/apps/blogai/auth.ts +++ b/apps/blogai/auth.ts @@ -18,9 +18,9 @@ export const { auth } = NextAuth({ providers: [ - // GitHub, Google, ], + callbacks: { async jwt({ token, profile }) { if (profile?.id) { @@ -41,13 +41,9 @@ export const { } return session } - - // uncomment to require authentication - // authorized({ auth }) { - // return !!auth?.user - // } - }, - pages: { - signIn: '/sign-in' - } + }, + pages: { + signIn: '/sign-in' + } + }) diff --git a/apps/blogai/components/article/article.tsx b/apps/blogai/components/article/article.tsx index 07642c0..ca4d8d4 100644 --- a/apps/blogai/components/article/article.tsx +++ b/apps/blogai/components/article/article.tsx @@ -471,7 +471,6 @@ const NineGrid: React.FC = ({ }; const Article = () => { - // const { t } = useTranslation(); const { t, i18n } = useTranslation() console.log("-----i18n-----", i18n.language) @@ -479,11 +478,7 @@ const Article = () => { const language = i18n.language const defCategories: TagItem[] = [ - { name: t("article.all"), value: "" } - // '#ALL', - // '#AI', - // '#Blockchain', ] const categoriesRef = useRef(defCategories);