This commit is contained in:
NotII
2025-04-07 19:25:24 +01:00
parent 7f7dd78818
commit 2f48ee38c2
102 changed files with 1825 additions and 761 deletions

View File

@@ -10,7 +10,7 @@ import {
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { getCookie } from "@/lib/client-utils";
import { getCookie } from "@/lib/api";
import axios from "axios";
import { useRouter } from "next/navigation";

View File

@@ -6,12 +6,12 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import { cn } from "@/lib/utils";
import { cn } from "@/lib/utils/general";
import { formatDistanceToNow } from "date-fns";
import axios from "axios";
import { toast } from "sonner";
import { ArrowLeft, Send, RefreshCw, File, FileText, Image as ImageIcon, Download } from "lucide-react";
import { getCookie, clientFetch } from "@/lib/client-utils";
import { getCookie, clientFetch } from "@/lib/api";
import { ImageViewerModal } from "@/components/modals/image-viewer-modal";
import BuyerOrderInfo from "./BuyerOrderInfo";

View File

@@ -11,7 +11,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { clientFetch } from "@/lib/client-utils";
import { clientFetch } from "@/lib/api";
interface UnreadCounts {
totalUnread: number;

View File

@@ -1,7 +1,7 @@
"use client"
import { useState, useEffect, useRef } from "react";
import { useRouter } from "next/navigation";
import React, { useState, useEffect, useRef, useCallback } from 'react';
import { useRouter } from 'next/navigation';
import {
Table,
TableBody,
@@ -22,7 +22,15 @@ import {
Eye,
User,
ChevronLeft,
ChevronRight
ChevronRight,
MessageSquare,
ArrowRightCircle,
X,
Clock,
CheckCheck,
Search,
Volume2,
VolumeX
} from "lucide-react";
import {
Select,
@@ -31,9 +39,11 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { clientFetch } from "@/lib/client-utils";
import { toast } from "sonner";
import { getCookie } from "@/lib/client-utils";
import { clientFetch, getCookie } from "@/lib/api";
import { formatDistance } from 'date-fns';
import Link from 'next/link';
import { cn } from '@/lib/utils/general';
interface Chat {
_id: string;

View File

@@ -10,7 +10,7 @@ import { Textarea } from "@/components/ui/textarea";
import { ArrowLeft, Send, RefreshCw, Search, User } from "lucide-react";
import axios from "axios";
import { toast } from "sonner";
import { getCookie } from "@/lib/client-utils";
import { getCookie } from "@/lib/api";
import debounce from "lodash/debounce";
interface User {

View File

@@ -2,7 +2,7 @@
import { useState, useEffect } from "react"
import OrderStats from "./order-stats"
import { getGreeting } from "@/lib/utils"
import { getGreeting } from "@/lib/utils/general"
import { statsConfig } from "@/config/dashboard"
import { getRandomQuote } from "@/config/quotes"
import type { OrderStatsData } from "@/lib/types"
@@ -11,7 +11,7 @@ import { ShoppingCart, RefreshCcw } from "lucide-react"
import { Button } from "@/components/ui/button"
import { useToast } from "@/components/ui/use-toast"
import { Skeleton } from "@/components/ui/skeleton"
import { clientFetch } from "@/lib/client-utils"
import { clientFetch } from "@/lib/api"
interface ContentProps {
username: string

View File

@@ -21,7 +21,7 @@ import { Switch } from '@/components/ui/switch';
import { Textarea } from '@/components/ui/textarea';
import { toast } from '@/components/ui/use-toast';
import { Promotion, PromotionFormData } from '@/lib/types/promotion';
import { fetchClient } from '@/lib/client-service';
import { fetchClient } from '@/lib/api';
// Form schema validation with Zod (same as NewPromotionForm)
const formSchema = z.object({

View File

@@ -21,7 +21,7 @@ import { Switch } from '@/components/ui/switch';
import { Textarea } from '@/components/ui/textarea';
import { toast } from '@/components/ui/use-toast';
import { PromotionFormData } from '@/lib/types/promotion';
import { fetchClient } from '@/lib/client-service';
import { fetchClient } from '@/lib/api';
// Form schema validation with Zod
const formSchema = z.object({

View File

@@ -31,7 +31,7 @@ import {
import { toast } from '@/components/ui/use-toast';
import { Badge } from '@/components/ui/badge';
import { Promotion } from '@/lib/types/promotion';
import { fetchClient } from '@/lib/client-service';
import { fetchClient } from '@/lib/api';
import NewPromotionForm from './NewPromotionForm';
import EditPromotionForm from './EditPromotionForm';