diff --git a/app/component/ItemDoctor.js b/app/component/ItemDoctor.js index f87cdba..bf4cc7b 100644 --- a/app/component/ItemDoctor.js +++ b/app/component/ItemDoctor.js @@ -4,7 +4,6 @@ import Link from "next/link"; import CustomLoading from "./loading/Custom"; import TextLoading from "./loading/Text"; import CircularLoading from "./loading/Circular"; -import moment from "moment-jalaali"; // Icons import ArrowLeftD from "@/components/icons/ArrowLeftD"; @@ -13,9 +12,7 @@ import LikeD from "@/components/icons/LikeD"; import PointD from "@/components/icons/PointD"; import { convertTimestampToPersianDateSimple } from "@/helper"; -moment.loadPersian({ dialect: "persian-modern" }); - -function ItemDoctor({ doctor, setDoctors }) { +function ItemDoctor({ doctor, loading, setDoctors }) { const handleLoading = () => { setDoctors((prevDoctors) => prevDoctors.map((item) => @@ -30,24 +27,24 @@ function ItemDoctor({ doctor, setDoctors }) {
  • {/* Detail Doctor */}
    - + image-doctor
    - +

    {doctor?.name}

    - +

    تخصص: {doctor?.specialties?.map( @@ -56,7 +53,7 @@ function ItemDoctor({ doctor, setDoctors }) { )}

    - +
    @@ -78,13 +75,13 @@ function ItemDoctor({ doctor, setDoctors }) { {/* Hours of work */}
    - +

    ساعت کاری: {doctor?.hours_of_work}

    - +

    diff --git a/components/clinics/head/filter/index.js b/components/clinics/head/filter/index.js index 7f71714..06770dc 100644 --- a/components/clinics/head/filter/index.js +++ b/components/clinics/head/filter/index.js @@ -14,6 +14,7 @@ function ModalSearchCity({ open, state, limit, + setPage, setOpen, children, selected, @@ -50,7 +51,9 @@ function ModalSearchCity({ if (name === "province") { setSelected({ ...selected, province: event, city: "" }); searchParams.set("state", event?.name); - searchParams.delete("city", selected.city?.name); + searchParams.delete("city"); + searchParams.delete("page"); + setPage(1); } else { setSelected({ ...selected, [name]: event }); searchParams.set("city", event?.name); diff --git a/components/clinics/index.js b/components/clinics/index.js index fd13cda..db45c90 100644 --- a/components/clinics/index.js +++ b/components/clinics/index.js @@ -14,6 +14,7 @@ import cities from "@/data/city.json"; function ClinicsPage({ clinics, matchedCity, matchedState }) { const searchParams = useSearchParams(); + const [page, setPage] = useState(clinics?.page?.currentPage); const [filteredClinics, setFilteredClinics] = useState(clinics?.data); const selectedState = searchParams.get("state") || matchedState?.name; @@ -38,6 +39,7 @@ function ClinicsPage({ clinics, matchedCity, matchedState }) { >

    diff --git a/components/clinics/list/index.js b/components/clinics/list/index.js index 9009954..2c66ce0 100644 --- a/components/clinics/list/index.js +++ b/components/clinics/list/index.js @@ -6,9 +6,16 @@ import PaginationContent from "@/app/component/PaginationContent"; import { request } from "@/services/response"; import { useRouter } from "next/navigation"; -function List({ limit, selected, clinics, pages, setFilteredClinics }) { +function List({ + page, + limit, + pages, + setPage, + clinics, + selected, + setFilteredClinics, +}) { const listPage = ["کلینیک ها", selected?.city?.name || ""]; - const [page, setPage] = useState(pages?.currentPage); const [loading, setLoading] = useState(false); const router = useRouter(); @@ -62,9 +69,6 @@ function List({ limit, selected, clinics, pages, setFilteredClinics }) { diff --git a/components/doctor/appointmentList/ItemAppointment.js b/components/doctor/appointmentList/ItemAppointment.js index 961e85d..a376ec7 100644 --- a/components/doctor/appointmentList/ItemAppointment.js +++ b/components/doctor/appointmentList/ItemAppointment.js @@ -5,9 +5,7 @@ import GreenCalendarTurn from "@/components/icons/GreenCalendarTurn"; import { Button } from "@mui/material"; import Image from "next/image"; import Link from "next/link"; -import moment from "moment-jalaali"; - -moment.loadPersian({ dialect: "persian-modern" }); +import { convertTimestampToPersianDateSimple } from "@/helper"; function ItemAppointment({ turn, loading }) { return ( @@ -48,9 +46,7 @@ function ItemAppointment({ turn, loading }) {

    {Number(turn?.free_turn) - ? `اولین نوبت آزاد: ${moment(turn?.free_turn * 1000).format( - "dddd jD jMMMM [ساعت] HH:mm" - )}` + ? `اولین نوبت آزاد: ${convertTimestampToPersianDateSimple(turn?.free_turn)}` : "نوبت ندارد"}

    diff --git a/components/doctor/detailDoctor/Share.js b/components/doctor/detailDoctor/Share.js index a5922a5..897cac9 100644 --- a/components/doctor/detailDoctor/Share.js +++ b/components/doctor/detailDoctor/Share.js @@ -25,8 +25,7 @@ function Share({ data }) {

    اشتراک گذاری

    - {/*
    */} -
    +
    diff --git a/components/doctor/detailDoctor/cards/AboutDcotor.js b/components/doctor/detailDoctor/cards/AboutDcotor.js index 11c7c1e..ccb2a53 100644 --- a/components/doctor/detailDoctor/cards/AboutDcotor.js +++ b/components/doctor/detailDoctor/cards/AboutDcotor.js @@ -41,7 +41,7 @@ function AboutDcotor({ doctor }) {

    - تخصص ها + خدمات

      {doctor?.expertise?.map((item, idx) => ( diff --git a/components/doctor/index.js b/components/doctor/index.js index 73b7562..1b5e99a 100644 --- a/components/doctor/index.js +++ b/components/doctor/index.js @@ -19,7 +19,7 @@ function DoctorPage({ doctor, comments }) {
    - +
    diff --git a/components/doctor/poster/QrCode.js b/components/doctor/poster/QrCode.js deleted file mode 100644 index 314651e..0000000 --- a/components/doctor/poster/QrCode.js +++ /dev/null @@ -1,15 +0,0 @@ -import Image from "next/image"; -import CodeSample from "@/public/assets/images/default-qr-code.png"; - -function QrCode() { - return ( -
    - -

    - nobat724/ahwaz.com -

    -
    - ); -} - -export default QrCode; diff --git a/components/doctor/poster/QrImg.js b/components/doctor/poster/QrImg.js new file mode 100644 index 0000000..5e30d61 --- /dev/null +++ b/components/doctor/poster/QrImg.js @@ -0,0 +1,33 @@ +import { useState, useEffect } from "react"; +import QRCode from "qrcode"; +import { getStateInfoClient } from "@/lib/getStateInfoClient"; + +export default function QrImg() { + const [host, setHost] = useState(""); + const [qrCodeData, setQrCodeData] = useState(""); + + useEffect(() => { + const info = getStateInfoClient(); + const linkHost = info.host; + const linkURL = info.fullUrl; + + setHost(linkHost); + + if (linkURL) { + QRCode.toDataURL(linkURL).then(setQrCodeData); + } + }, []); + + return ( +
    + {qrCodeData ? ( + + ) : ( +

    در حال بارگذاری...

    + )} +

    + {host || ""} +

    +
    + ); +} diff --git a/components/doctor/poster/Services.js b/components/doctor/poster/Services.js index 340cbb4..1769090 100644 --- a/components/doctor/poster/Services.js +++ b/components/doctor/poster/Services.js @@ -9,7 +9,7 @@ function Services({ data }) {

    خدمات:

      - {data?.specialties?.map((item, idx) => ( + {data?.expertise?.map((item, idx) => (
    • {item.name}

      diff --git a/components/doctor/poster/index.js b/components/doctor/poster/index.js index 87ed84a..bcc3f7e 100644 --- a/components/doctor/poster/index.js +++ b/components/doctor/poster/index.js @@ -4,7 +4,7 @@ import Services from "./Services"; import Address from "./Address"; import Telefon from "./Telefon"; import ImageProfile from "./ImageProfile"; -import QrCode from "./QrCode"; +import QrImg from "./QrImg"; function Poster({ data }) { return ( @@ -19,18 +19,18 @@ function Poster({ data }) {

      تخصص: - {data?.expertise?.map( + {data?.specialties?.map( (item, idx) => - `${item.name} ${data.expertise.length === idx + 1 ? "" : "|"} ` + `${item.name} ${data.specialties.length === idx + 1 ? "" : "|"} ` )}

    -
    +
    - +
    ); diff --git a/components/doctors/head/index.js b/components/doctors/head/index.js index 76957fd..4fcbe17 100644 --- a/components/doctors/head/index.js +++ b/components/doctors/head/index.js @@ -1,53 +1,14 @@ -import { useState } from "react"; - import SearchBar from "../search"; import SortList from "../sortlist"; -import { useRouter, useSearchParams } from "next/navigation"; -import specialties from "@/data/specialties.json"; +import { useRouter } from "next/navigation"; // Data -import states from "@/data/state.json"; -import cities from "@/data/city.json"; import { QueryForDoctorsFilter, QueryForDoctorsReq } from "@/helper"; import { request } from "@/services/response"; import FilterLocate from "./FilterLocate"; -function Head({ matchedCity, matchedState, setDoctors }) { - const searchParams = useSearchParams(); +function Head({ filter, setFilter, setPage, setDoctors }) { const router = useRouter(); - const fieldName = searchParams.get("specialty"); - - const findItem = (key, name) => - specialties.find((item) => item[key] === name); - const isParent = - findItem("name", fieldName) && findItem("name", fieldName).parent; - - const selectedState = searchParams.get("state") || matchedState?.name; - const selectedCity = - searchParams.get("city") || - (matchedCity?.name && matchedCity?.id !== "600" - ? matchedCity?.name - : false); - - const valCategory = isParent - ? findItem("id", isParent) - : findItem("name", fieldName); - const valSpecialty = isParent && findItem("name", fieldName); - - const defaultFilter = { - state: selectedState && states.find((item) => item.name === selectedState), - city: selectedCity && cities.find((item) => item.name === selectedCity), - category: valCategory, - specialty: valSpecialty, - active: searchParams.get("active") || 0, - gender: searchParams.get("gender") || "هر دو", - degree: searchParams.get("degree") || "همه موارد", - sort: (searchParams.get("sort") && Number(searchParams.get("sort"))) || "", - name: - searchParams.get("name") || valSpecialty?.name || valCategory?.name || "", - }; - - const [filter, setFilter] = useState(defaultFilter); const setDataInURL = (newFilter) => { const query = QueryForDoctorsFilter(newFilter); @@ -74,6 +35,10 @@ function Head({ matchedCity, matchedState, setDoctors }) { delete filteredName.name; } + filteredName.page = 1; + filteredName.limit = 12; + setPage(1); + return request .getDoctors(filteredName) .then((res) => { @@ -89,6 +54,7 @@ function Head({ matchedCity, matchedState, setDoctors }) {
    + specialties.find((item) => item[key] === name); + const isParent = + findItem("name", fieldName) && findItem("name", fieldName).parent; + + const selectedState = searchParams.get("state") || matchedState?.name; + const selectedCity = + searchParams.get("city") || + (matchedCity?.name && matchedCity?.id !== "600" + ? matchedCity?.name + : false); + + const valCategory = isParent + ? findItem("id", isParent) + : findItem("name", fieldName); + const valSpecialty = isParent && findItem("name", fieldName); + + const defaultFilter = { + state: selectedState && states.find((item) => item.name === selectedState), + city: selectedCity && cities.find((item) => item.name === selectedCity), + category: valCategory, + specialty: valSpecialty, + active: searchParams.get("active") || 0, + gender: searchParams.get("gender") || "هر دو", + degree: searchParams.get("degree") || "همه موارد", + sort: (searchParams.get("sort") && Number(searchParams.get("sort"))) || "", + name: + searchParams.get("name") || valSpecialty?.name || valCategory?.name || "", + }; + + const [filter, setFilter] = useState(defaultFilter); return (
    - +
    ); } diff --git a/components/doctors/listDoctors/index.js b/components/doctors/listDoctors/index.js index 77f95e6..c4a0640 100644 --- a/components/doctors/listDoctors/index.js +++ b/components/doctors/listDoctors/index.js @@ -1,8 +1,57 @@ -import doctorList from "@/data/doctors.json"; -import Pagination from "@/app/component/Pagination"; +import { useState } from "react"; import ItemDoctor from "@/app/component/ItemDoctor"; +import PaginationContent from "@/app/component/PaginationContent"; +import { QueryForDoctorsFilter, QueryForDoctorsReq } from "@/helper"; +import { request } from "@/services/response"; +import { useRouter } from "next/navigation"; + +function ListDoctors({ + data, + page, + limit, + filter, + doctors, + setPage, + setDoctors, +}) { + const [loading, setLoading] = useState(false); + const router = useRouter(); + + const changePage = (_, num) => { + setLoading(true); + const searchParams = new URLSearchParams(window.location.search); + searchParams.set("page", num); + router.push(`?${searchParams.toString()}`); + + setPage(num); + let params = { + ...QueryForDoctorsReq(filter), + page: num, + limit, + }; + if ( + data?.name === data.specialty?.name || + data?.name === data.category?.name + ) { + params.name = ""; + delete params.name; + } + + console.log(params); + + request + .getDoctors(params) + .then((res) => { + console.log(res); + + if (res.data) setDoctors(res.data); + }) + .catch((err) => { + console.log(err); + }) + .finally(() => setLoading(false)); + }; -function ListDoctors({ doctors, setDoctors }) { return ( <>
    @@ -12,6 +61,7 @@ function ListDoctors({ doctors, setDoctors }) { ))} @@ -22,8 +72,13 @@ function ListDoctors({ doctors, setDoctors }) {

    )}
    -
    - +
    +
    ); diff --git a/helper/index.js b/helper/index.js index ee46abe..c271e11 100644 --- a/helper/index.js +++ b/helper/index.js @@ -260,6 +260,14 @@ export const degreeVal = [ { name: "پزشک فوق تخصص", val: "subspecialistplus" }, ]; +export const addLabelToList = (list) => + list.map((item) => { + return { + ...item, + label: item.name, + }; + }); + export const QueryForDoctorsFilter = (newFilter) => { const query = {}; @@ -355,50 +363,6 @@ export const QueryForDoctorsReq = (newFilter) => { return params; }; -export const addLabelToList = (list) => - list.map((item) => { - return { - ...item, - label: item.name, - }; - }); - -export const QueryForClinicsFilter = (searchParams) => { - const params = {}; - - // 🔹 specialty (find by name in specialties.json) - if (searchParams.specialty) { - const spec = specialties.find((s) => s.name === searchParams.specialty); - if (spec) { - params.specialty = spec.id; - } - } - - // 🔹 city (find by name in city.json) - if (searchParams.city) { - const cityObj = cities.find((c) => c.name === searchParams.city.name); - if (cityObj) { - params.city = cityObj.id; - } - } - - // 🔹 state (find by name in state.json) - if (searchParams.province) { - const stateObj = states.find((s) => s.name === searchParams.province.name); - if (stateObj) { - params.state = stateObj.id; - } - } - - // 🔹 page - if (searchParams.page) params.page = searchParams.page; - - // 🔹 limit - if (searchParams.limit) params.limit = searchParams.limit; - - return params; -}; - export const buildDoctorParams = (searchParams) => { const params = {}; @@ -469,6 +433,48 @@ export const buildDoctorParams = (searchParams) => { else if ([4, 5].includes(sortNum)) params.sort = "DESC"; } + // 🔹 page + params.page = searchParams.page || 1; + + // 🔹 limit + params.limit = 12; + + return params; +}; + +export const QueryForClinicsFilter = (searchParams) => { + const params = {}; + + // 🔹 specialty (find by name in specialties.json) + if (searchParams.specialty) { + const spec = specialties.find((s) => s.name === searchParams.specialty); + if (spec) { + params.specialty = spec.id; + } + } + + // 🔹 city (find by name in city.json) + if (searchParams.city) { + const cityObj = cities.find((c) => c.name === searchParams.city.name); + if (cityObj) { + params.city = cityObj.id; + } + } + + // 🔹 state (find by name in state.json) + if (searchParams.province) { + const stateObj = states.find((s) => s.name === searchParams.province.name); + if (stateObj) { + params.state = stateObj.id; + } + } + + // 🔹 page + params.page = searchParams.page || 1; + + // 🔹 limit + params.limit = 12; + return params; }; @@ -500,10 +506,10 @@ export const buildClinicParams = (searchParams) => { } // 🔹 page - if (searchParams.page) { - params.page = searchParams.page; - params.limit = 12; - } + params.page = searchParams.page || 1; + + // 🔹 limit + params.limit = 12; return params; }; diff --git a/lib/getStateInfoClient.js b/lib/getStateInfoClient.js index 6217900..5ed74be 100644 --- a/lib/getStateInfoClient.js +++ b/lib/getStateInfoClient.js @@ -4,8 +4,9 @@ import statesData from "@/data/state.json"; export function getStateInfoClient() { if (typeof window === "undefined") - return { matchedCity: null, matchedState: null }; + return { matchedCity: null, matchedState: null, fullUrl: "" }; + const fullUrl = window.location.href; // کل URL const host = window.location.host || ""; const subdomain = host.split(".")[0]; @@ -17,5 +18,5 @@ export function getStateInfoClient() { matchedCity && statesData.find((state) => state.id === matchedCity.province_id); - return { matchedCity, matchedState }; + return { matchedCity, matchedState, host, fullUrl }; } diff --git a/package-lock.json b/package-lock.json index 936edd9..939aebc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,8 @@ "next": "^14.2.20", "next-themes": "^0.3.0", "npm": "^10.8.2", + "qrcode": "^1.5.4", + "qrcode.react": "^4.2.0", "react": "^18.0.0", "react-dom": "^18", "react-easy-crop": "^5.1.0", @@ -46,7 +48,8 @@ "styled-components": "^6.1.11", "stylis": "^4.3.4", "stylis-plugin-rtl": "^2.1.1", - "swiper": "^11.1.9" + "swiper": "^11.1.9", + "uninstall": "^0.0.0" }, "devDependencies": { "cross-env": "^7.0.3", @@ -8879,6 +8882,15 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", @@ -9122,6 +9134,12 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -18034,6 +18052,15 @@ "node": ">=4" } }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/popper.js": { "version": "1.16.1-lts", "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1-lts.tgz", @@ -19539,6 +19566,93 @@ "teleport": ">=0.2.0" } }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qrcode.react": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-4.2.0.tgz", + "integrity": "sha512-QpgqWi8rD9DsS9EP3z7BT+5lY5SFhsqGjpgW5DY/i3mK4M9DTBNz3ErMi8BWYEfI3L0d8GIbGmcdFAS1uIRGjA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/qrcode/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qrcode/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/qrcode/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/qrcode/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -20201,6 +20315,12 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -20864,6 +20984,12 @@ "node": ">= 0.8.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -22756,6 +22882,12 @@ "node": ">=4" } }, + "node_modules/uninstall": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/uninstall/-/uninstall-0.0.0.tgz", + "integrity": "sha512-pjP/0+A4gsbDVa8XH/S2GZdT9NPJW8NFMy3GI7HnsWG+NAmFSSj3QidNosXBI9cPtxxNExEDdhKFO6sli8K3mA==", + "license": "MIT" + }, "node_modules/unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -23396,6 +23528,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, "node_modules/which-typed-array": { "version": "1.1.16", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", diff --git a/package.json b/package.json index 4bd7860..8e450d5 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,8 @@ "next": "^14.2.20", "next-themes": "^0.3.0", "npm": "^10.8.2", + "qrcode": "^1.5.4", + "qrcode.react": "^4.2.0", "react": "^18.0.0", "react-dom": "^18", "react-easy-crop": "^5.1.0", @@ -47,7 +49,8 @@ "styled-components": "^6.1.11", "stylis": "^4.3.4", "stylis-plugin-rtl": "^2.1.1", - "swiper": "^11.1.9" + "swiper": "^11.1.9", + "uninstall": "^0.0.0" }, "devDependencies": { "cross-env": "^7.0.3",