-
-
{children}
- {isMobile && (
-
-
-
- )}
+
+
+
+ {/* */}
+ {children}
+
+ {isMobile && (
+
+ {children}
+
+
+ )}
>
);
};
export default Layout;
+export const GardenLayout: React.FC
= ({ children }) => {
+ const [isMobile, setIsMobile] = useState(false);
+
+ useEffect(() => {
+ // Check if window is defined before accessing it
+ if (typeof window !== "undefined") {
+ const checkIsMobile = () => {
+ setIsMobile(window.innerWidth <= 768);
+ };
+ checkIsMobile();
+ window.addEventListener("resize", checkIsMobile);
+ return () => {
+ window.removeEventListener("resize", checkIsMobile);
+ };
+ }
+ }, []);
+
+ return (
+ <>
+
+ {/* */}
+ {children}
+
+ {isMobile && (
+
+ {children}
+
+
+ )}
+ >
+ );
+};
+
export const LayoutNoNav: React.FC = ({ children }) => {
const [isMobile, setIsMobile] = useState(false);
diff --git a/components/Section/Sidebar.tsx b/components/Section/Sidebar.tsx
index 36c4cb16..455117a5 100644
--- a/components/Section/Sidebar.tsx
+++ b/components/Section/Sidebar.tsx
@@ -80,7 +80,7 @@ const Sidebar: React.FC = () => {
>
- Kategori Diskusi
+ Components
{navCategoryItems.map((item, idx) => (
@@ -89,7 +89,7 @@ const Sidebar: React.FC = () => {
- Pengaturan
+ Your stuff
{navSettingItems.map((item, idx) => (
@@ -122,7 +122,7 @@ const Sidebar: React.FC = () => {
onClick={() => setOpenAside(false)}
>
-
Tutup Menu
+
Menu
@@ -132,11 +132,297 @@ const Sidebar: React.FC = () => {
className="w-full flex items-center justify-start space-x-2"
>
- Buka Menu
+ Menu
>
);
};
-export default Sidebar;
\ No newline at end of file
+export default Sidebar;
+
+export function DesktopSidebar () {
+ return (
+