From 7e38955f23b31e936491453c2ef1a6562620837e Mon Sep 17 00:00:00 2001 From: MohammedMeraj Date: Thu, 7 Nov 2024 23:11:26 +0530 Subject: [PATCH] Changes refined --- .gitignore | 2 +- README.md | 5 +-- convex/README.md | 90 ------------------------------------------------ next.config.mjs | 5 +-- 4 files changed, 3 insertions(+), 99 deletions(-) delete mode 100644 convex/README.md diff --git a/.gitignore b/.gitignore index 252706f..a7263f9 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,6 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts - +.gitignore .env.local diff --git a/README.md b/README.md index 62f3df4..1f91d39 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,4 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. -======= -# StackSurge ->>>>>>> 5db8df5d3cefbbbc2bca2240d255eb01738c0f5e +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. \ No newline at end of file diff --git a/convex/README.md b/convex/README.md deleted file mode 100644 index 4d82e13..0000000 --- a/convex/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Welcome to your Convex functions directory! - -Write your Convex functions here. -See https://docs.convex.dev/functions for more. - -A query function that takes two arguments looks like: - -```ts -// functions.js -import { query } from "./_generated/server"; -import { v } from "convex/values"; - -export const myQueryFunction = query({ - // Validators for arguments. - args: { - first: v.number(), - second: v.string(), - }, - - // Function implementation. - handler: async (ctx, args) => { - // Read the database as many times as you need here. - // See https://docs.convex.dev/database/reading-data. - const documents = await ctx.db.query("tablename").collect(); - - // Arguments passed from the client are properties of the args object. - console.log(args.first, args.second); - - // Write arbitrary JavaScript here: filter, aggregate, build derived data, - // remove non-public properties, or create new objects. - return documents; - }, -}); -``` - -Using this query function in a React component looks like: - -```ts -const data = useQuery(api.functions.myQueryFunction, { - first: 10, - second: "hello", -}); -``` - -A mutation function looks like: - -```ts -// functions.js -import { mutation } from "./_generated/server"; -import { v } from "convex/values"; - -export const myMutationFunction = mutation({ - // Validators for arguments. - args: { - first: v.string(), - second: v.string(), - }, - - // Function implementation. - handler: async (ctx, args) => { - // Insert or modify documents in the database here. - // Mutations can also read from the database like queries. - // See https://docs.convex.dev/database/writing-data. - const message = { body: args.first, author: args.second }; - const id = await ctx.db.insert("messages", message); - - // Optionally, return a value from your mutation. - return await ctx.db.get(id); - }, -}); -``` - -Using this mutation function in a React component looks like: - -```ts -const mutation = useMutation(api.functions.myMutationFunction); -function handleButtonPress() { - // fire and forget, the most common way to use mutations - mutation({ first: "Hello!", second: "me" }); - // OR - // use the result once the mutation has completed - mutation({ first: "Hello!", second: "me" }).then((result) => - console.log(result), - ); -} -``` - -Use the Convex CLI to push your functions to a deployment. See everything -the Convex CLI can do by running `npx convex -h` in your project root -directory. To learn more, launch the docs with `npx convex docs`. diff --git a/next.config.mjs b/next.config.mjs index afc754f..18a00d1 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -12,10 +12,7 @@ const nextConfig = { protocol: "https", hostname: "utfs.io", }, - { - protocol: "https", - hostname: "gravatar.com", // Add Gravatar here - }, + ], }, };