diff --git a/package-lock.json b/package-lock.json index 257f5fa3..4f685352 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "easy-invoice", - "version": "0.2.0", + "version": "0.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "easy-invoice", - "version": "0.2.0", + "version": "0.2.2", "license": "MIT", "dependencies": { "@hookform/resolvers": "^3.9.1", @@ -47,6 +47,7 @@ "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", "ulid": "^2.3.0", + "validator": "^13.12.0", "viem": "^2.21.48", "zod": "^3.23.8" }, @@ -57,6 +58,7 @@ "@types/pg": "^8.11.10", "@types/react": "^18", "@types/react-dom": "^18", + "@types/validator": "^13.12.2", "dotenv-cli": "^7.3.0", "husky": "^9.1.7", "lint-staged": "^15.4.3", @@ -3348,6 +3350,13 @@ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", "license": "MIT" }, + "node_modules/@types/validator": { + "version": "13.12.2", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.2.tgz", + "integrity": "sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==", + "dev": true, + "license": "MIT" + }, "node_modules/@walletconnect/core": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.18.0.tgz", @@ -7689,6 +7698,15 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/validator": { + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", + "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, "node_modules/valtio": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.13.2.tgz", diff --git a/package.json b/package.json index b6a49b48..f021f5d0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "easy-invoice", "description": "A Request Network demo app for easy invoice creation using Request API", - "version": "0.2.2", + "version": "0.3.0", "license": "MIT", "scripts": { "dev": "chmod +x dev/dev-startup.sh && ./dev/dev-startup.sh ", @@ -56,6 +56,7 @@ "tailwind-merge": "^2.5.4", "tailwindcss-animate": "^1.0.7", "ulid": "^2.3.0", + "validator": "^13.12.0", "viem": "^2.21.48", "zod": "^3.23.8" }, @@ -66,6 +67,7 @@ "@types/pg": "^8.11.10", "@types/react": "^18", "@types/react-dom": "^18", + "@types/validator": "^13.12.2", "dotenv-cli": "^7.3.0", "husky": "^9.1.7", "lint-staged": "^15.4.3", diff --git a/src/app/direct-payment/page.tsx b/src/app/direct-payment/page.tsx new file mode 100644 index 00000000..ba4ea16b --- /dev/null +++ b/src/app/direct-payment/page.tsx @@ -0,0 +1,41 @@ +import { BackgroundWrapper } from "@/components/background-wrapper"; +import { DirectPayment } from "@/components/direct-payment"; +import { Footer } from "@/components/footer"; +import { Header } from "@/components/header"; +import { getCurrentSession } from "@/server/auth"; +import type { Metadata } from "next"; +import { redirect } from "next/navigation"; + +export const metadata: Metadata = { + title: "Direct Payment | Easy Invoice", + description: "Send payments directly without creating a request first", +}; + +export default async function DirectPaymentPage() { + const { user } = await getCurrentSession(); + + // Redirect to home if not logged in + if (!user) { + redirect("/"); + } + + return ( + +
+
+

+ Direct Payment +

+

+ Send payments quickly without having to create a request first. +

+ + +
+