tambahan .env.local
This commit is contained in:
1
run.env.local
Normal file
1
run.env.local
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bun --env-file=.env.local run --bun dev
|
||||||
3
run.prisma.env.local
Normal file
3
run.prisma.env.local
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
bun --env-file=.env.local prisma db push
|
||||||
|
bun --env-file=.env.local prisma db seed
|
||||||
|
bun --env-file=.env.local run --bun build
|
||||||
@@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
import { MainColor } from "@/app_modules/_global/color";
|
import { MainColor } from "@/app_modules/_global/color";
|
||||||
import { UIGlobal_LayoutDefault } from "@/app_modules/_global/ui";
|
import { UIGlobal_LayoutDefault } from "@/app_modules/_global/ui";
|
||||||
import { Button, Stack, Text, Title } from "@mantine/core";
|
import { Button, Stack, Title } from "@mantine/core";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function InvalidUser() {
|
export default function InvalidUser() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const deleteCookie = async () => {
|
const deleteCookie = async () => {
|
||||||
const sessionKey = process.env.NEXT_PUBLIC_BASE_SESSION_KEY!;
|
const sessionKey = process.env.NEXT_PUBLIC_BASE_SESSION_KEY!;
|
||||||
if (!sessionKey) {
|
if (!sessionKey) {
|
||||||
@@ -14,12 +16,15 @@ export default function InvalidUser() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
setIsLoading(true);
|
||||||
await fetch("/api/auth/logout", {
|
await fetch("/api/auth/logout", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
});
|
});
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Gagal menghapus cookie:", error);
|
console.error("Gagal menghapus cookie:", error);
|
||||||
|
} finally {
|
||||||
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -32,6 +37,8 @@ export default function InvalidUser() {
|
|||||||
Invalid User
|
Invalid User
|
||||||
</Title>
|
</Title>
|
||||||
<Button
|
<Button
|
||||||
|
loading={isLoading}
|
||||||
|
loaderPosition="center"
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
deleteCookie();
|
deleteCookie();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/_global/loading_page_v2";
|
|
||||||
import { Button, Group, Paper, Stack } from "@mantine/core";
|
import { Button, Group, Paper, Stack } from "@mantine/core";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -21,11 +20,10 @@ const ReactQuill = dynamic(
|
|||||||
);
|
);
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AccentColor,
|
MainColor
|
||||||
MainColor,
|
|
||||||
} from "@/app_modules/_global/color/color_pallet";
|
} from "@/app_modules/_global/color/color_pallet";
|
||||||
import mqtt_client from "@/util/mqtt_client";
|
|
||||||
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
import CustomSkeleton from "@/app_modules/components/CustomSkeleton";
|
||||||
|
import mqtt_client from "@/util/mqtt_client";
|
||||||
|
|
||||||
const maxLength = 500;
|
const maxLength = 500;
|
||||||
export default function Forum_Create() {
|
export default function Forum_Create() {
|
||||||
|
|||||||
Reference in New Issue
Block a user