Skip to content

Commit

Permalink
fix: formatting all files
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianmolinab committed Jun 12, 2024
1 parent d987041 commit 06b08c2
Show file tree
Hide file tree
Showing 101 changed files with 1,317 additions and 1,297 deletions.
10 changes: 5 additions & 5 deletions src/components/footer/footer.container.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import FooterView from "./footer.view"
import FooterView from "./footer.view";

const FooterContainer = () => {
const year = new Date().getFullYear()
const year = new Date().getFullYear();
return (
<>
<FooterView year={year} />
</>
)
}
);
};

export default FooterContainer
export default FooterContainer;
12 changes: 6 additions & 6 deletions src/components/footer/footer.view.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FC } from "react"
import type { FC } from "react";

interface PropsInterface {
year: number
year: number;
}

const FooterView: FC<PropsInterface> = ({ year }) => {
Expand All @@ -15,14 +15,14 @@ const FooterView: FC<PropsInterface> = ({ year }) => {
<img
className="h-10 w-10"
src="https://trycatch.tv/_astro/nibble.a3d0ce1e.png"
></img>
/>
</p>
<p className="text-xs">&copy; {year} GlassCamp</p>
</div>
</footer>
</div>
</>
)
}
);
};

export default FooterView
export default FooterView;
14 changes: 7 additions & 7 deletions src/components/navbar/navbar.container.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// En Navbar.tsx
import { FC } from "react"
import NavbarView from "./navbar.view"
import type { FC } from "react";
import NavbarView from "./navbar.view";

const routes = [
{
Expand All @@ -11,16 +11,16 @@ const routes = [
name: "Backoffice",
path: "/backoffice",
},
]
];

interface NavbarProps {}
type NavbarProps = {};

const NavbarContainer: FC<NavbarProps> = () => {
return (
<>
<NavbarView routes={routes} />
</>
)
}
);
};

export default NavbarContainer
export default NavbarContainer;
28 changes: 14 additions & 14 deletions src/components/navbar/navbar.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import {
MenubarItem,
MenubarMenu,
MenubarTrigger,
} from "@radix-ui/react-menubar"
import { Menu } from "lucide-react"
import { FC } from "react"
import { LazyLoadComponent } from "react-lazy-load-image-component"
import { Link } from "react-router-dom"
import { Avatar, AvatarImage, Button } from "../ui"
} from "@radix-ui/react-menubar";
import { Menu } from "lucide-react";
import type { FC } from "react";
import { LazyLoadComponent } from "react-lazy-load-image-component";
import { Link } from "react-router-dom";
import { Avatar, AvatarImage, Button } from "../ui";

interface NavbarLinkProps {
name: string
path: string
name: string;
path: string;
}

interface PropsInterface {
routes: NavbarLinkProps[]
routes: NavbarLinkProps[];
}

const NavbarView: FC<PropsInterface> = ({ routes }) => {
Expand Down Expand Up @@ -46,7 +46,7 @@ const NavbarView: FC<PropsInterface> = ({ routes }) => {
</Button>
</Link>
</MenubarItem>
)
);
})}
<MenubarItem>
<Link to={"/profile"}>
Expand Down Expand Up @@ -76,7 +76,7 @@ const NavbarView: FC<PropsInterface> = ({ routes }) => {
</Button>
</Link>
</li>
)
);
})}
<li>
<Link to={"/profile"}>
Expand All @@ -90,7 +90,7 @@ const NavbarView: FC<PropsInterface> = ({ routes }) => {
</ul>
</nav>
</>
)
}
);
};

export default NavbarView
export default NavbarView;
26 changes: 13 additions & 13 deletions src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from "react"
import * as AccordionPrimitive from "@radix-ui/react-accordion"
import { ChevronDown } from "lucide-react"
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDown } from "lucide-react";
import * as React from "react";

import { cn } from "@/utils/CssHelpers/utils"
import { cn } from "@/utils/CssHelpers/utils";

const Accordion = AccordionPrimitive.Root
const Accordion = AccordionPrimitive.Root;

const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
Expand All @@ -15,8 +15,8 @@ const AccordionItem = React.forwardRef<
className={cn("border-b", className)}
{...props}
/>
))
AccordionItem.displayName = "AccordionItem"
));
AccordionItem.displayName = "AccordionItem";

const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
Expand All @@ -27,16 +27,16 @@ const AccordionTrigger = React.forwardRef<
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
className
className,
)}
{...props}
>
{children}
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
))
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
));
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;

const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
Expand All @@ -49,8 +49,8 @@ const AccordionContent = React.forwardRef<
>
<div className={cn("pb-4 pt-0", className)}>{children}</div>
</AccordionPrimitive.Content>
))
));

AccordionContent.displayName = AccordionPrimitive.Content.displayName
AccordionContent.displayName = AccordionPrimitive.Content.displayName;

export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
24 changes: 12 additions & 12 deletions src/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import * as React from "react";

import { cn } from "@/utils/CssHelpers/utils"
import { cn } from "@/utils/CssHelpers/utils";

const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
Expand All @@ -11,12 +11,12 @@ const Avatar = React.forwardRef<
ref={ref}
className={cn(
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
className
className,
)}
{...props}
/>
))
Avatar.displayName = AvatarPrimitive.Root.displayName
));
Avatar.displayName = AvatarPrimitive.Root.displayName;

const AvatarImage = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Image>,
Expand All @@ -27,8 +27,8 @@ const AvatarImage = React.forwardRef<
className={cn("aspect-square h-full w-full", className)}
{...props}
/>
))
AvatarImage.displayName = AvatarPrimitive.Image.displayName
));
AvatarImage.displayName = AvatarPrimitive.Image.displayName;

const AvatarFallback = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Fallback>,
Expand All @@ -38,11 +38,11 @@ const AvatarFallback = React.forwardRef<
ref={ref}
className={cn(
"flex h-full w-full items-center justify-center rounded-full bg-muted",
className
className,
)}
{...props}
/>
))
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
));
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;

export { Avatar, AvatarFallback, AvatarImage }
export { Avatar, AvatarFallback, AvatarImage };
14 changes: 7 additions & 7 deletions src/components/ui/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { type VariantProps, cva } from "class-variance-authority";
import type * as React from "react";

import { cn } from "@/utils/CssHelpers/utils"
import { cn } from "@/utils/CssHelpers/utils";

const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
Expand All @@ -20,8 +20,8 @@ const badgeVariants = cva(
defaultVariants: {
variant: "default",
},
}
)
},
);

export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
Expand All @@ -30,7 +30,7 @@ export interface BadgeProps
function Badge({ className, variant, ...props }: BadgeProps) {
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
)
);
}

export { Badge, badgeVariants }
export { Badge, badgeVariants };
26 changes: 13 additions & 13 deletions src/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import * as React from "react"
import { Slot } from "@radix-ui/react-slot";
import { type VariantProps, cva } from "class-variance-authority";
import * as React from "react";

import { cn } from "@/utils/CssHelpers/utils"
import { cn } from "@/utils/CssHelpers/utils";

const buttonVariants = cva(
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
Expand Down Expand Up @@ -31,27 +31,27 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
}
)
},
);

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button"
const Comp = asChild ? Slot : "button";
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
)
}
)
Button.displayName = "Button"
);
},
);
Button.displayName = "Button";

export { Button, buttonVariants }
export { Button, buttonVariants };
Loading

0 comments on commit 06b08c2

Please sign in to comment.