Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run format:check
- run: npm run lint
- run: npm test
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"git.ignoreLimitWarning": true,
"typescript.tsdk": "node_modules\\typescript\\lib"
}
"git.ignoreLimitWarning": true,
"typescript.tsdk": "node_modules\\typescript\\lib"
}
6 changes: 1 addition & 5 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
},
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
Expand Down
32 changes: 15 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site with selected dishes recipes" />
<link rel="manifest" href="/manifest.json" />
<title>Dev Cooking</title>
</head>

<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site with selected dishes recipes" />
<link rel="manifest" href="/manifest.json" />
<title>Dev Cooking</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>

</html>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"format:check": "prettier --check .",
"format": "prettier --write .",
"preview": "vite preview",
"test": "vitest",
"test:coverage": "vitest run --coverage --watch=false"
Expand Down
2 changes: 1 addition & 1 deletion src/components/fragments/userBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const UserBadge = () => {
<div className="flex flex-row items-center gap-2 justify-baseline mt-3">
<span className="">{username}</span>
<Tooltip>
<TooltipTrigger>
<TooltipTrigger asChild>
<Button
size="xs"
variant="ghost"
Expand Down
20 changes: 10 additions & 10 deletions src/components/ui/button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react"
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 { cva, type VariantProps } from "class-variance-authority";

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

const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
Expand Down Expand Up @@ -35,8 +35,8 @@
variant: "default",
size: "default",
},
}
)
},
);

function Button({
className,
Expand All @@ -46,9 +46,9 @@
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean
asChild?: boolean;
}) {
const Comp = asChild ? Slot : "button"
const Comp = asChild ? Slot : "button";

return (
<Comp
Expand All @@ -58,7 +58,7 @@
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
)
);
}

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

Check warning on line 64 in src/components/ui/button.tsx

View workflow job for this annotation

GitHub Actions / build (20.x)

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components

Check warning on line 64 in src/components/ui/button.tsx

View workflow job for this annotation

GitHub Actions / build (22.x)

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components

Check warning on line 64 in src/components/ui/button.tsx

View workflow job for this annotation

GitHub Actions / build (24.x)

Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
46 changes: 23 additions & 23 deletions src/components/ui/input-group.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";

import { cn } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Textarea } from "@/components/ui/textarea"
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";

function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
return (
Expand All @@ -27,11 +27,11 @@ function InputGroup({ className, ...props }: React.ComponentProps<"div">) {
// Error state.
"has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",

className
className,
)}
{...props}
/>
)
);
}

const inputGroupAddonVariants = cva(
Expand All @@ -52,8 +52,8 @@ const inputGroupAddonVariants = cva(
defaultVariants: {
align: "inline-start",
},
}
)
},
);

function InputGroupAddon({
className,
Expand All @@ -68,13 +68,13 @@ function InputGroupAddon({
className={cn(inputGroupAddonVariants({ align }), className)}
onClick={(e) => {
if ((e.target as HTMLElement).closest("button")) {
return
return;
}
e.currentTarget.parentElement?.querySelector("input")?.focus()
e.currentTarget.parentElement?.querySelector("input")?.focus();
}}
{...props}
/>
)
);
}

const inputGroupButtonVariants = cva(
Expand All @@ -92,8 +92,8 @@ const inputGroupButtonVariants = cva(
defaultVariants: {
size: "xs",
},
}
)
},
);

function InputGroupButton({
className,
Expand All @@ -111,19 +111,19 @@ function InputGroupButton({
className={cn(inputGroupButtonVariants({ size }), className)}
{...props}
/>
)
);
}

function InputGroupText({ className, ...props }: React.ComponentProps<"span">) {
return (
<span
className={cn(
"text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
className
className,
)}
{...props}
/>
)
);
}

function InputGroupInput({
Expand All @@ -135,11 +135,11 @@ function InputGroupInput({
data-slot="input-group-control"
className={cn(
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
className
className,
)}
{...props}
/>
)
);
}

function InputGroupTextarea({
Expand All @@ -151,11 +151,11 @@ function InputGroupTextarea({
data-slot="input-group-control"
className={cn(
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
className
className,
)}
{...props}
/>
)
);
}

export {
Expand All @@ -165,4 +165,4 @@ export {
InputGroupText,
InputGroupInput,
InputGroupTextarea,
}
};
10 changes: 5 additions & 5 deletions src/components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react"
import * as React from "react";

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

function Input({ className, type, ...props }: React.ComponentProps<"input">) {
return (
Expand All @@ -11,11 +11,11 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
className
className,
)}
{...props}
/>
)
);
}

export { Input }
export { Input };
8 changes: 4 additions & 4 deletions src/components/ui/spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Loader2Icon } from "lucide-react"
import { Loader2Icon } from "lucide-react";

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

function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
return (
Expand All @@ -10,7 +10,7 @@ function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
className={cn("size-4 animate-spin", className)}
{...props}
/>
)
);
}

export { Spinner }
export { Spinner };
Loading
Loading