Skip to content

Commit

Permalink
style: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Dec 24, 2023
1 parent dc2f81b commit de0a7c2
Show file tree
Hide file tree
Showing 24 changed files with 207 additions and 226 deletions.
2 changes: 1 addition & 1 deletion apps/expo/src/app/(app)/address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function AddressScreen() {
paddingVertical: Spacings.s2,
}}
>
<View br40 className="border-primary border bg-white" padding-s4>
<View br40 className="border border-primary bg-white" padding-s4>
<View row className="space-x-1">
<Text text65 primary className="font-bold">
{address.title}
Expand Down
4 changes: 2 additions & 2 deletions apps/expo/src/app/(app)/product/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import ProductForm from "@/components/ProductForm";
import { View } from "react-native-ui-lib";
import ProductForm from "@/components/ProductForm";

export default function EditProductScreen() {
return (
<View bg-white padding-s4 flex>
<ProductForm edit />
</View>
);
}
}
2 changes: 1 addition & 1 deletion apps/expo/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Header(props: HeaderProps) {
const router = useRouter();

return (
<SafeAreaView className="bg-primary flex-row" {...props} edges={["top"]}>
<SafeAreaView className="flex-row bg-primary" {...props} edges={["top"]}>
<View flex row padding-s4 className="space-x-2">
{router.canGoBack() && (
<Button
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/lib/hooks/useRefreshOnFocus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useFocusEffect } from "expo-router";
import React from "react";
import { useFocusEffect } from "expo-router";

export function useRefreshOnFocus<T>(refetch: () => Promise<T>) {
const firstTimeRef = React.useRef(true);
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/src/utils/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Constants from "expo-constants";
import { StorageClient } from "@supabase/storage-js";
import type { UploadOptions } from "use-tus";
import Constants from "expo-constants";

const STORAGE_URL = Constants.expoConfig?.extra?.SUPABASE_STORAGE_URL as string;
const SERVICE_KEY = Constants.expoConfig?.extra?.SUPABASE_SERVICE_KEY as string;
Expand Down
12 changes: 3 additions & 9 deletions apps/expo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
],
"~/*": [
"./assets/*"
]
"@/*": ["./src/*"],
"~/*": ["./assets/*"]
},
"jsx": "react-native",
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json",
Expand All @@ -24,7 +20,5 @@
"expo-env.d.ts",
"app.d.ts "
],
"exclude": [
"node_modules"
]
"exclude": ["node_modules"]
}
9 changes: 2 additions & 7 deletions apps/nextjs/kirimase.config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"hasSrc": true,
"packages": [
"drizzle",
"trpc",
"shadcn-ui",
"clerk"
],
"packages": ["drizzle", "trpc", "shadcn-ui", "clerk"],
"preferredPackageManager": "pnpm",
"t3": true,
"alias": "@",
Expand All @@ -15,4 +10,4 @@
"driver": "mysql",
"componentLib": "shadcn-ui",
"auth": "clerk"
}
}
7 changes: 4 additions & 3 deletions apps/nextjs/src/app/categories/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import CategorieList from "@/components/categories/CategoryList";
import NewCategorieModal from "@/components/categories/CategoryModal";

import { getCategories } from "@vivat/api/src/services/categories/queries";

export default async function Categories() {
const categories = await getCategories();
const categories = await getCategories();

return (
<main className="max-w-3xl mx-auto p-5 md:p-0 sm:pt-4">
<main className="mx-auto max-w-3xl p-5 sm:pt-4 md:p-0">
<div className="flex justify-between">
<h1 className="font-semibold text-2xl my-2">Categories</h1>
<h1 className="my-2 text-2xl font-semibold">Categories</h1>
<NewCategorieModal />
</div>
<CategorieList categories={categories} />
Expand Down
4 changes: 2 additions & 2 deletions apps/nextjs/src/app/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default function Loading() {
return (
<div className="grid place-items-center animate-pulse text-zinc-300 pt-4">
<div className="grid animate-pulse place-items-center pt-4 text-zinc-300">
<div role="status">
<svg
aria-hidden="true"
className="w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-zinc-600"
className="mr-2 h-8 w-8 animate-spin fill-zinc-600 text-gray-200 dark:text-gray-600"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Input } from "./ui/input";
export default function Header() {
const activeLink = usePathname();
const link = LINKS.find(({ href }) => href === activeLink);

return (
<header className="flex h-14 items-center gap-4 border-b bg-gray-100/40 px-6 dark:bg-gray-800/40 lg:h-[60px]">
<Link className="lg:hidden" href="#">
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import Image from "next/image";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { LINKS } from "@/constant/router";

import { Button } from "./ui/button";
import { LINKS } from "@/constant/router";

export default function Sidebar() {
const activeLink = usePathname();
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/components/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import type {ThemeProviderProps} from "next-themes/dist/types";
import type { ThemeProviderProps } from "next-themes/dist/types";

export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
Expand Down
47 changes: 27 additions & 20 deletions apps/nextjs/src/components/ui/card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from "react"

import { cn } from "@/lib/utils"
import * as React from "react";
import { cn } from "@/lib/utils";

const Card = React.forwardRef<
HTMLDivElement,
Expand All @@ -9,13 +8,13 @@ const Card = React.forwardRef<
<div
ref={ref}
className={cn(
"rounded-lg border bg-card text-card-foreground shadow-sm",
className
"bg-card text-card-foreground rounded-lg border shadow-sm",
className,
)}
{...props}
/>
))
Card.displayName = "Card"
));
Card.displayName = "Card";

const CardHeader = React.forwardRef<
HTMLDivElement,
Expand All @@ -26,43 +25,44 @@ const CardHeader = React.forwardRef<
className={cn("flex flex-col space-y-1.5 p-6", className)}
{...props}
/>
))
CardHeader.displayName = "CardHeader"
));
CardHeader.displayName = "CardHeader";

const CardTitle = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLHeadingElement>
>(({ className, ...props }, ref) => (
// eslint-disable-next-line jsx-a11y/heading-has-content
<h3
ref={ref}
className={cn(
"text-2xl font-semibold leading-none tracking-tight",
className
className,
)}
{...props}
/>
))
CardTitle.displayName = "CardTitle"
));
CardTitle.displayName = "CardTitle";

const CardDescription = React.forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
<p
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
className={cn("text-muted-foreground text-sm", className)}
{...props}
/>
))
CardDescription.displayName = "CardDescription"
));
CardDescription.displayName = "CardDescription";

const CardContent = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
))
CardContent.displayName = "CardContent"
));
CardContent.displayName = "CardContent";

const CardFooter = React.forwardRef<
HTMLDivElement,
Expand All @@ -73,7 +73,14 @@ const CardFooter = React.forwardRef<
className={cn("flex items-center p-6 pt-0", className)}
{...props}
/>
))
CardFooter.displayName = "CardFooter"
));
CardFooter.displayName = "CardFooter";

export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
export {
Card,
CardHeader,
CardFooter,
CardTitle,
CardDescription,
CardContent,
};
63 changes: 31 additions & 32 deletions apps/nextjs/src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
"use client"
"use client";

import * as React from "react"
import * as DialogPrimitive from "@radix-ui/react-dialog"
import { X } from "lucide-react"
import * as React from "react";
import { cn } from "@/lib/utils";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";

import { cn } from "@/lib/utils"
const Dialog = DialogPrimitive.Root;

const Dialog = DialogPrimitive.Root
const DialogTrigger = DialogPrimitive.Trigger;

const DialogTrigger = DialogPrimitive.Trigger
const DialogPortal = DialogPrimitive.Portal;

const DialogPortal = DialogPrimitive.Portal

const DialogClose = DialogPrimitive.Close
const DialogClose = DialogPrimitive.Close;

const DialogOverlay = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Overlay>,
Expand All @@ -21,13 +20,13 @@ const DialogOverlay = React.forwardRef<
<DialogPrimitive.Overlay
ref={ref}
className={cn(
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className
"bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",
className,
)}
{...props}
/>
))
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
));
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;

const DialogContent = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Content>,
Expand All @@ -38,20 +37,20 @@ const DialogContent = React.forwardRef<
<DialogPrimitive.Content
ref={ref}
className={cn(
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
className
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",
className,
)}
{...props}
>
{children}
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none">
<X className="h-4 w-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
</DialogPortal>
))
DialogContent.displayName = DialogPrimitive.Content.displayName
));
DialogContent.displayName = DialogPrimitive.Content.displayName;

const DialogHeader = ({
className,
Expand All @@ -60,12 +59,12 @@ const DialogHeader = ({
<div
className={cn(
"flex flex-col space-y-1.5 text-center sm:text-left",
className
className,
)}
{...props}
/>
)
DialogHeader.displayName = "DialogHeader"
);
DialogHeader.displayName = "DialogHeader";

const DialogFooter = ({
className,
Expand All @@ -74,12 +73,12 @@ const DialogFooter = ({
<div
className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className
className,
)}
{...props}
/>
)
DialogFooter.displayName = "DialogFooter"
);
DialogFooter.displayName = "DialogFooter";

const DialogTitle = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Title>,
Expand All @@ -89,24 +88,24 @@ const DialogTitle = React.forwardRef<
ref={ref}
className={cn(
"text-lg font-semibold leading-none tracking-tight",
className
className,
)}
{...props}
/>
))
DialogTitle.displayName = DialogPrimitive.Title.displayName
));
DialogTitle.displayName = DialogPrimitive.Title.displayName;

const DialogDescription = React.forwardRef<
React.ElementRef<typeof DialogPrimitive.Description>,
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
>(({ className, ...props }, ref) => (
<DialogPrimitive.Description
ref={ref}
className={cn("text-sm text-muted-foreground", className)}
className={cn("text-muted-foreground text-sm", className)}
{...props}
/>
))
DialogDescription.displayName = DialogPrimitive.Description.displayName
));
DialogDescription.displayName = DialogPrimitive.Description.displayName;

export {
Dialog,
Expand All @@ -119,4 +118,4 @@ export {
DialogFooter,
DialogTitle,
DialogDescription,
}
};
Loading

0 comments on commit de0a7c2

Please sign in to comment.