-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from agrattan0820/dev
v0.3.6
- Loading branch information
Showing
14 changed files
with
188 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
import { authOptions } from "@ai/pages/api/auth/[...nextauth]"; | ||
import QueryProvider from "@ai/utils/query-provider"; | ||
import SocketProvider from "@ai/utils/socket-provider"; | ||
import { getServerSession } from "next-auth"; | ||
import { redirect } from "next/navigation"; | ||
import * as Sentry from "@sentry/nextjs"; | ||
|
||
export default function RoomLayout({ | ||
export default async function RoomLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const session = await getServerSession(authOptions()); | ||
|
||
if (!session) { | ||
redirect("/"); | ||
} | ||
|
||
Sentry.setUser({ | ||
id: session.user.id, | ||
email: session.user.email ?? "", | ||
username: session.user.nickname, | ||
}); | ||
|
||
return ( | ||
<QueryProvider> | ||
<SocketProvider>{children}</SocketProvider> | ||
<SocketProvider session={session}>{children}</SocketProvider> | ||
</QueryProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use client"; | ||
|
||
import { useSession } from "next-auth/react"; | ||
import { useEffect } from "react"; | ||
import * as Sentry from "@sentry/nextjs"; | ||
|
||
export default function SentryProvider() { | ||
const { data: session } = useSession(); | ||
|
||
useEffect(() => { | ||
if (session) { | ||
Sentry.setUser({ | ||
id: session.user.id, | ||
email: session.user.email ?? "", | ||
username: session.user.nickname, | ||
}); | ||
} | ||
}, [session]); | ||
|
||
return <></>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Replicate from "replicate"; | ||
|
||
export const replicate = new Replicate({ | ||
auth: process.env.REPLICATE_API_TOKEN ?? "", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
1f16edf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
artificial-unintelligence – ./
artificial-unintelligence-agrattan.vercel.app
artificial-unintelligence-git-main-agrattan.vercel.app
un-ai.vercel.app
artificialunintelligence.gg
www.artificialunintelligence.gg
dev.artificialunintelligence.gg