feat: add theme toggle to admin sidebars and update form list to use full-row navigation links
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState, useTransition, useRef, useCallback, useEffect } from "react";
|
||||
import React, { useState, useRef, useCallback, useEffect } from "react";
|
||||
import { useRouter, usePathname } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
@@ -33,10 +33,11 @@ import {
|
||||
SidebarHeader,
|
||||
SidebarFooter,
|
||||
} from "@/components/ui/sidebar";
|
||||
import { Plus, Trash, ArrowUp, ArrowDown, Loader2, Save, Image as ImageIcon, X, Check, LayoutDashboard, ClipboardList, ArrowLeft, Webhook } from "lucide-react";
|
||||
import { Plus, Trash, ArrowUp, ArrowDown, Loader2, Image as ImageIcon, X, Check, LayoutDashboard, ClipboardList, ArrowLeft, Webhook } from "lucide-react";
|
||||
import Image from 'next/image';
|
||||
import { RichTextEditor } from "@/components/rich-text-editor";
|
||||
import { FormattedText } from "@/components/formatted-text";
|
||||
import { ThemeToggle } from "@/components/theme-toggle";
|
||||
|
||||
interface Question {
|
||||
id: string;
|
||||
@@ -613,10 +614,11 @@ export function AdminSidebar({ formId }: { formId: string }) {
|
||||
|
||||
return (
|
||||
<Sidebar variant="sidebar" collapsible="icon">
|
||||
<SidebarHeader className="border-b border-border py-4 px-4 flex items-center justify-between">
|
||||
<SidebarHeader className="border-b border-border py-4 px-4 flex flex-row items-center justify-between">
|
||||
<span className="font-bold tracking-wider text-primary text-sm uppercase">
|
||||
Form Admin
|
||||
</span>
|
||||
<ThemeToggle />
|
||||
</SidebarHeader>
|
||||
|
||||
<SidebarContent>
|
||||
|
||||
@@ -19,7 +19,7 @@ export default async function AdminFormLayout(
|
||||
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<div className="flex w-full bg-background text-foreground dark">
|
||||
<div className="flex w-full bg-background text-foreground">
|
||||
<AdminSidebar formId={params.id} />
|
||||
<div className="flex-1 overflow-hidden">
|
||||
<div className="md:hidden p-2">
|
||||
|
||||
Reference in New Issue
Block a user