Refactor UI imports and update component paths
Some checks failed
Build Frontend / build (push) Failing after 7s
Some checks failed
Build Frontend / build (push) Failing after 7s
Replaces imports from 'components/ui' with 'components/common' across the app and dashboard pages, and updates model and API imports to use new paths under 'lib'. Removes redundant authentication checks from several dashboard pages. Adds new dashboard components and utility files, and reorganizes hooks and services into the 'lib' directory for improved structure.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useRef, lazy, Suspense } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
|
||||
import { Button } from "@/components/common/button";
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/common/dialog";
|
||||
import { Send, Bold, Italic, Code, Link as LinkIcon, Image as ImageIcon, X, Eye, EyeOff, Package } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import { clientFetch } from "@/lib/api";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { Textarea } from "@/components/common/textarea";
|
||||
import Image from "next/image";
|
||||
import ProductSelector from "./product-selector";
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function BroadcastDialog({ open, setOpen }: BroadcastDialogProps)
|
||||
?.split("=")[1];
|
||||
|
||||
if (!authToken) {
|
||||
document.location.href = "/login";
|
||||
document.location.href = "/auth/login";
|
||||
throw new Error("No authentication token found");
|
||||
}
|
||||
|
||||
@@ -365,4 +365,5 @@ __italic text__
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user