File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change
1
+ import "@/lib/observer-setup" ;
1
2
import { NextResponse } from "next/server" ;
2
3
import { messageNotifier } from "@/lib/observer" ;
3
- import { DiscordObserver } from "@/lib/dicord" ;
4
4
5
5
export async function POST ( req : Request ) {
6
6
try {
7
- messageNotifier . subscribe ( DiscordObserver ) ;
8
-
9
7
const data = await req . json ( ) ;
10
8
await messageNotifier . notify ( data ) ;
11
9
Original file line number Diff line number Diff line change 3
3
import { HeroUIProvider , ToastProvider } from "@heroui/react" ;
4
4
import { ThemeProvider as NextThemesProvider } from "next-themes" ;
5
5
import Favicon from "./favicon" ;
6
- import { ModalLoginContext } from "@/components/auth" ;
7
- import { ModalFeedbackContext } from "@/components/feedback" ;
8
6
9
7
type Props = {
10
8
children : React . ReactNode ;
@@ -15,20 +13,23 @@ export default function Providers({ children }: Props) {
15
13
< HeroUIProvider >
16
14
< NextThemesProvider attribute = "class" defaultTheme = "system" enableSystem >
17
15
< ToastProvider
18
- placement = "bottom-center "
16
+ placement = "bottom-right "
19
17
maxVisibleToasts = { 1 }
20
18
toastProps = { {
21
- size : "lg" ,
22
- radius : "lg" ,
23
- variant : "solid" ,
24
- color : "primary" ,
19
+ classNames : {
20
+ motionDiv : "flex justify-end items-center pb-10" ,
21
+ base : "w-72 rounded-xl shadow-xl bg-neutral-950 dark:bg-white border-2 border-neutral-800 dark:border-neutral-200" ,
22
+ wrapper : "pl-2" ,
23
+ title : "text-white dark:text-neutral-950 font-medium" ,
24
+ description : "text-neutral-500" ,
25
+ } ,
26
+ size : "sm" ,
25
27
timeout : 5000 ,
26
28
} }
29
+ regionProps = { { classNames : { base : "z-[50]" } } }
27
30
/>
31
+ { children }
28
32
< Favicon />
29
- < ModalLoginContext >
30
- < ModalFeedbackContext > { children } </ ModalFeedbackContext >
31
- </ ModalLoginContext >
32
33
</ NextThemesProvider >
33
34
</ HeroUIProvider >
34
35
) ;
Original file line number Diff line number Diff line change
1
+ import { messageNotifier } from "@/lib/observer" ;
2
+ import { DiscordObserver } from "@/lib/dicord" ;
3
+
4
+ messageNotifier . subscribe ( DiscordObserver ) ;
You can’t perform that action at this time.
0 commit comments