refactor: format imports, fix indentation, and improve readability across files
Apply consistent import ordering and indentation in frontend and backend files. Ensure better maintainability and adherence to code style standards.
This commit is contained in:
@@ -1,4 +1,10 @@
|
|||||||
import { IsDateString, IsNotEmpty, IsOptional, IsString, MaxLength } from "class-validator";
|
import {
|
||||||
|
IsDateString,
|
||||||
|
IsNotEmpty,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
MaxLength,
|
||||||
|
} from "class-validator";
|
||||||
|
|
||||||
export class CreateApiKeyDto {
|
export class CreateApiKeyDto {
|
||||||
@IsString()
|
@IsString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
IsArray,
|
||||||
IsEnum,
|
IsEnum,
|
||||||
IsNotEmpty,
|
IsNotEmpty,
|
||||||
IsOptional,
|
IsOptional,
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
import { IsEnum, IsOptional, IsString, IsUUID, MaxLength } from "class-validator";
|
import {
|
||||||
|
IsEnum,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
IsUUID,
|
||||||
|
MaxLength,
|
||||||
|
} from "class-validator";
|
||||||
|
|
||||||
export enum ReportReason {
|
export enum ReportReason {
|
||||||
INAPPROPRIATE = "inappropriate",
|
INAPPROPRIATE = "inappropriate",
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ import * as React from "react";
|
|||||||
import { AppSidebar } from "@/components/app-sidebar";
|
import { AppSidebar } from "@/components/app-sidebar";
|
||||||
import { MobileFilters } from "@/components/mobile-filters";
|
import { MobileFilters } from "@/components/mobile-filters";
|
||||||
import { SearchSidebar } from "@/components/search-sidebar";
|
import { SearchSidebar } from "@/components/search-sidebar";
|
||||||
import { UserNavMobile } from "@/components/user-nav-mobile";
|
|
||||||
import {
|
import {
|
||||||
SidebarInset,
|
SidebarInset,
|
||||||
SidebarProvider,
|
SidebarProvider,
|
||||||
SidebarTrigger,
|
SidebarTrigger,
|
||||||
} from "@/components/ui/sidebar";
|
} from "@/components/ui/sidebar";
|
||||||
|
import { UserNavMobile } from "@/components/user-nav-mobile";
|
||||||
|
|
||||||
export default function DashboardLayout({
|
export default function DashboardLayout({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -7,12 +7,18 @@ import * as React from "react";
|
|||||||
import { ContentList } from "@/components/content-list";
|
import { ContentList } from "@/components/content-list";
|
||||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
|
import { Spinner } from "@/components/ui/spinner";
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
import { useAuth } from "@/providers/auth-provider";
|
import { useAuth } from "@/providers/auth-provider";
|
||||||
import { ContentService } from "@/services/content.service";
|
import { ContentService } from "@/services/content.service";
|
||||||
import { FavoriteService } from "@/services/favorite.service";
|
import { FavoriteService } from "@/services/favorite.service";
|
||||||
import { Spinner } from "@/components/ui/spinner";
|
|
||||||
|
|
||||||
export default function ProfilePage() {
|
export default function ProfilePage() {
|
||||||
const { user, isAuthenticated, isLoading, logout } = useAuth();
|
const { user, isAuthenticated, isLoading, logout } = useAuth();
|
||||||
|
|||||||
@@ -10,7 +10,13 @@ import { useForm } from "react-hook-form";
|
|||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import * as z from "zod";
|
import * as z from "zod";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
import {
|
||||||
|
Card,
|
||||||
|
CardContent,
|
||||||
|
CardDescription,
|
||||||
|
CardHeader,
|
||||||
|
CardTitle,
|
||||||
|
} from "@/components/ui/card";
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
FormControl,
|
FormControl,
|
||||||
@@ -28,10 +34,10 @@ import {
|
|||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
|
import { Spinner } from "@/components/ui/spinner";
|
||||||
import { useAuth } from "@/providers/auth-provider";
|
import { useAuth } from "@/providers/auth-provider";
|
||||||
import { CategoryService } from "@/services/category.service";
|
import { CategoryService } from "@/services/category.service";
|
||||||
import { ContentService } from "@/services/content.service";
|
import { ContentService } from "@/services/content.service";
|
||||||
import { Spinner } from "@/components/ui/spinner";
|
|
||||||
import type { Category } from "@/types/content";
|
import type { Category } from "@/types/content";
|
||||||
|
|
||||||
const uploadSchema = z.object({
|
const uploadSchema = z.object({
|
||||||
|
|||||||
@@ -159,7 +159,9 @@ export function AppSidebar() {
|
|||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton
|
<SidebarMenuButton
|
||||||
asChild
|
asChild
|
||||||
isActive={pathname === "/profile" && searchParams.get("tab") === "favorites"}
|
isActive={
|
||||||
|
pathname === "/profile" && searchParams.get("tab") === "favorites"
|
||||||
|
}
|
||||||
tooltip="Mes Favoris"
|
tooltip="Mes Favoris"
|
||||||
>
|
>
|
||||||
<Link href="/profile?tab=favorites">
|
<Link href="/profile?tab=favorites">
|
||||||
@@ -171,7 +173,9 @@ export function AppSidebar() {
|
|||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton
|
<SidebarMenuButton
|
||||||
asChild
|
asChild
|
||||||
isActive={pathname === "/profile" && searchParams.get("tab") === "memes"}
|
isActive={
|
||||||
|
pathname === "/profile" && searchParams.get("tab") === "memes"
|
||||||
|
}
|
||||||
tooltip="Mes Mèmes"
|
tooltip="Mes Mèmes"
|
||||||
>
|
>
|
||||||
<Link href="/profile?tab=memes">
|
<Link href="/profile?tab=memes">
|
||||||
|
|||||||
@@ -29,9 +29,7 @@ export function UserNavMobile() {
|
|||||||
<Link href="/profile">
|
<Link href="/profile">
|
||||||
<Avatar className="h-8 w-8 border">
|
<Avatar className="h-8 w-8 border">
|
||||||
<AvatarImage src={user.avatarUrl} alt={user.username} />
|
<AvatarImage src={user.avatarUrl} alt={user.username} />
|
||||||
<AvatarFallback>
|
<AvatarFallback>{user.username.slice(0, 2).toUpperCase()}</AvatarFallback>
|
||||||
{user.username.slice(0, 2).toUpperCase()}
|
|
||||||
</AvatarFallback>
|
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</Link>
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user