Skip to content

Instantly share code, notes, and snippets.

"use client";
import * as React from "react";
import { ChevronLeft, ChevronRight } from "lucide-react";
import { DayPicker } from "react-day-picker";
import { cn } from "@/lib/utils";
import { buttonVariants } from "@/components/ui/button";
export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
@GHULAM-1
GHULAM-1 / page.tsx
Created December 6, 2024 13:26
api calls on frontend --web self dinning
'use client';
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import axios from "axios";
import { useState } from "react";
import { ownerT } from "../types/owner-types";
import { Types } from "mongoose";
import { ObjectId } from "mongodb"; // Import ObjectId
type OwnerWithoutId = Omit<ownerT, "_id">;
import React from 'react';
import NavBar from '@/components/landing-page/nav-bar';
import Footer from '@/components/landing-page/footer';
import { ArrowLeft, ArrowRight, MessagesSquare, Dot } from 'lucide-react';
import Link from 'next/link';
import GridPattern from '@/components/ui/grid-pattern'; // Adjust import if necessary
export default function NotFound() {
return (
<>
const express = require('express');
const mysql = require('mysql2');
const app = express();
const port = 3000;
// MySQL Database Configuration
const db = mysql.createConnection({
host: 'localhost',
user: 'root',
// import { NextResponse } from "next/server";
// import type { NextRequest } from "next/server";
// export function middleware(request: NextRequest) {
// // Get the access token from cookies
// const accessToken = request.cookies.get("accessToken");
// // Get the path the user is trying to access
// const path = request.nextUrl.pathname;
# Server port
PORT=4000
# ENV (development, production)
NODE_ENV=development
# DB
DB_USER=royal-tap-user
DB_PASS="oixC<euV&e'Gt4?z"
DB_NAME=royal-tap-db
8a30e6-74.myshopify.com
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
2024-10