diff --git a/app/login-verify/page.js b/app/login-verify/page.js
index d7b8bd9..e1a25e1 100644
--- a/app/login-verify/page.js
+++ b/app/login-verify/page.js
@@ -1,24 +1,8 @@
-"use client";
-
-import RegisterPage from "@/components/register";
-import SetCodePage from "@/components/register/SetCodePage";
-import LogInPage from "@/components/register/LogInPage";
-import { useState } from "react";
+import ContentVerify from "@/components/register/ContentVerify";
function LoginVerify() {
- const [isSendMsg, setIsSendMsg] = useState(false);
-
return (
-
- {isSendMsg ? (
-
- ) : (
-
- )}
-
+
);
}
diff --git a/app/login/page.js b/app/login/page.js
index 32fb291..de07643 100644
--- a/app/login/page.js
+++ b/app/login/page.js
@@ -1,22 +1,8 @@
-"use client";
-import RegisterPage from "@/components/register";
-import SetCodePage from "@/components/register/SetCodePage";
-import LogInPage from "@/components/register/LogInPage";
-import { useState } from "react";
+import ContentLogin from "@/components/register/ContentLogin";
function LogIn() {
- const [isSendMsg, setIsSendMsg] = useState(false);
-
return (
-
-
- {isSendMsg ? (
-
- ) : (
-
- )}
-
-
+
);
}
diff --git a/app/panel/(layout)/layout.js b/app/panel/(layout)/layout.js
index 55ba72b..28ccc5a 100644
--- a/app/panel/(layout)/layout.js
+++ b/app/panel/(layout)/layout.js
@@ -1,61 +1,8 @@
-"use client";
-
-import { useEffect, useState } from "react";
-import Header from "@/components/layoutPanel/header";
-import Sidebar from "@/components/layoutPanel/sidebar";
-import Information from "@/data/information.json";
-import UserDetail from "@/components/layoutPanel/userDetail";
-import { usePathname } from "next/navigation";
-import BgGray from "@/components/layoutPanel/sidebar/BgGray";
+import Content from "@/components/panel/Content";
function LayoutPanel({ children }) {
- const pathname = usePathname();
- const [active, setActive] = useState(false);
- const [open, setOpen] = useState(true);
- const [loading, setLoading] = useState(true);
-
- useEffect(() => {
- setTimeout(() => {
- setLoading(false);
- }, 2000);
- }, []);
-
return (
-
-
-
-
-
-
-
- {pathname.includes("dashboard") && (
-
- )}
-
+
);
}
diff --git a/components/panel/Content.js b/components/panel/Content.js
new file mode 100644
index 0000000..857f697
--- /dev/null
+++ b/components/panel/Content.js
@@ -0,0 +1,61 @@
+"use client";
+
+import { useEffect, useState } from "react";
+import Header from "@/components/layoutPanel/header";
+import Sidebar from "@/components/layoutPanel/sidebar";
+import Information from "@/data/information.json";
+import UserDetail from "@/components/layoutPanel/userDetail";
+import { usePathname } from "next/navigation";
+import BgGray from "@/components/layoutPanel/sidebar/BgGray";
+
+function Content({ children }) {
+ const pathname = usePathname();
+ const [active, setActive] = useState(false);
+ const [open, setOpen] = useState(true);
+ const [loading, setLoading] = useState(true);
+
+ useEffect(() => {
+ setTimeout(() => {
+ setLoading(false);
+ }, 2000);
+ }, []);
+
+ return (
+
+
+
+
+
+
+
+ {pathname.includes("dashboard") && (
+
+ )}
+
+ );
+}
+
+export default Content;
diff --git a/components/register/ContentLogin.js b/components/register/ContentLogin.js
new file mode 100644
index 0000000..2be58cc
--- /dev/null
+++ b/components/register/ContentLogin.js
@@ -0,0 +1,24 @@
+"use client";
+
+import RegisterPage from "@/components/register";
+import SetCodePage from "@/components/register/SetCodePage";
+import LogInPage from "@/components/register/LogInPage";
+import { useState } from "react";
+
+function ContentLogin() {
+ const [isSendMsg, setIsSendMsg] = useState(false);
+
+ return (
+
+
+ {isSendMsg ? (
+
+ ) : (
+
+ )}
+
+
+ );
+}
+
+export default ContentLogin;
diff --git a/components/register/ContentVerify.js b/components/register/ContentVerify.js
new file mode 100644
index 0000000..d89fb87
--- /dev/null
+++ b/components/register/ContentVerify.js
@@ -0,0 +1,25 @@
+"use client";
+
+import RegisterPage from "@/components/register";
+import SetCodePage from "@/components/register/SetCodePage";
+import LogInPage from "@/components/register/LogInPage";
+import { useState } from "react";
+
+function ContentVerify() {
+ const [isSendMsg, setIsSendMsg] = useState(false);
+
+ return (
+
+ {isSendMsg ? (
+
+ ) : (
+
+ )}
+
+ );
+}
+
+export default ContentVerify;