This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class=" max-w-2xl mx-auto flex flex-col space-y-3"> | |
<h1 | |
class="inline-block text-8xl font-bold bg-gradient-to-r from-purple-500 to-purple-800 bg-clip-text text-transparent text-center my-10" | |
>AI Nucleus</h1> | |
<form class='flex flex-col space-y-3' > | |
<label htmlFor="prompt" class='text-white font-bold text-2xl text-center'> | |
¿Cómo puedo ayudarte? | |
</label> | |
<div class="relative"> | |
<input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function GenerateAI() { | |
return ( | |
<> | |
<h1 className="text-6xl font-extrabold">Generar Receta con IA</h1> | |
<div className="max-w-4xl mx-auto"> | |
<form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
</script> | |
<template> | |
<h1 class="text-6xl font-extrabold">Generar Receta con IA</h1> | |
<div class="max-w-4xl mx-auto"> | |
<form | |
class='flex flex-col space-y-3 py-10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Logo from "@/components/ui/Logo"; | |
import Link from "next/link"; | |
export default function Home() { | |
return ( | |
<> | |
<header className=" bg-purple-950 py-5"> | |
<div className="max-w-3xl mx-auto flex flex-col lg:flex-row items-center"> | |
<div className="w-96 lg:w-[500px]"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div className="space-y-1"> | |
<label className="block text-sm font-medium leading-6 text-gray-900"> | |
Imagen Producto | |
</label> | |
<div {...getRootProps({ | |
className: ` | |
py-20 border-2 border-dashed text-center | |
${isDragActive ? 'border-gray-900 text-gray-900 bg-gray-200 ' : 'border-gray-400 text-gray-400 bg-white'} | |
${isDragReject ? 'border-none bg-white' : 'cursor-not-allowed'} | |
`})}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const ProductFormSchema = z.object({ | |
name: z.string() | |
.min(1, {message: 'El Nombre del Producto no puede ir vacio'}), | |
price: z.coerce.number({message: 'Precio no válido'}) | |
.min(1, {message: 'El Precio debe ser mayor a 0'}), | |
inventory: z.coerce.number({message: 'Inventario no válido'}) | |
.min(1, {message: 'El inventario debe ser mayor a 0'}), | |
categoryId: z.coerce.number({message: 'La Categoria no es válida'}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default async function ProductForm() { | |
return ( | |
<> | |
<div className="space-y-2 "> | |
<label | |
htmlFor="name" | |
className="block" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function isValidPage(value: number) { | |
if (value == null) { | |
return false; | |
} | |
if (typeof value !== 'number' && isNaN(value)) { | |
return false; | |
} | |
if (value <= 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function ProductsTable() { | |
const products = [] | |
return ( | |
<div className="px-4 sm:px-6 lg:px-8 mt-10"> | |
<div className="mt-8 flow-root "> | |
<div className="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"> | |
<div className="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8 bg-white p-5 "> | |
<table className="min-w-full divide-y divide-gray-300 "> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function TransactionSummary() { | |
const transaction = { | |
contents: [] | |
} | |
return ( | |
<> | |
<div className='mt-6 text-sm font-medium text-gray-500 border border-gray-200'> | |
<p className='text-sm font-black text-gray-900 p-2 bg-gray-200 '>ID: </p> |
NewerOlder