Skip to content

Instantly share code, notes, and snippets.

View viibhuGupta's full-sized avatar
🎯
Focusing

Vibhu Gupta viibhuGupta

🎯
Focusing
View GitHub Profile
@viibhuGupta
viibhuGupta / Local Font
Created June 22, 2024 14:52
Font Setup
STEP 1 :
public/fonts put all fonts
1
2
STEP 2 :
// @/utils/coustomFonts.js
import localFont from "next/font/local";
"use client";
import React from "react";
import { useForm } from "react-hook-form";
const Upload = () => {
const { register, handleSubmit } = useForm();
async function onSumbithandler(data) {
const image = data.profile[0];
// console.log(image);
import { useRouter } from "next/navigation";
import React, { useState } from "react";
const EditForm = ({ course }) => {
const [newtitle, setNewtitle] = useState(course.title);
const [newDescription, setNewDescription] = useState(course.description);
const [newPrice, setNewPrice] = useState(course.price);
const router = useRouter();
@viibhuGupta
viibhuGupta / doc
Last active June 20, 2024 13:52
NextAuth Prisma MongoDb
https://desishub.notion.site/How-to-create-a-Step-by-Step-Guide-Adding-Google-Authentication-with-NextAuth-in-Next-js-13-Prisma-2e08646b1875402e9d8cb988a108fd77
@viibhuGupta
viibhuGupta / Data Fetching and showing single products dynamic route Category.json
Last active June 14, 2024 17:12
Data Fetching and showing single products dynamic route
{
"categories": [
{
"id": 1,
"title": "Television",
"description": "A wide range of high-quality televisions.",
"image": "/json/categories/television.jpg",
"key": "CATEGORY_TELEVISION"
},
{
rm -rf hello