@devvistatech/devvista-kit 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -12
- package/LICENSE +6 -6
- package/README.md +15 -15
- package/app/about/page.tsx +298 -298
- package/app/adRequest/page.tsx +549 -549
- package/app/analytics/page.tsx +346 -346
- package/app/api/about/route.ts +306 -306
- package/app/api/adRequest/route.ts +567 -567
- package/app/api/analytics/[reportType]/route.ts +337 -337
- package/app/api/bio/route.ts +313 -313
- package/app/api/blog/route.ts +306 -306
- package/app/api/chat/route.ts +14 -14
- package/app/api/contact/route.ts +409 -409
- package/app/api/contacts/route.ts +224 -224
- package/app/api/files/route.ts +429 -429
- package/app/api/gallery-data/route.ts +735 -735
- package/app/api/schedule/route.ts +455 -455
- package/app/api/sync-user/route.ts +131 -131
- package/app/api/trial-request/route.ts +297 -297
- package/app/blog/[id]/page.tsx +288 -288
- package/app/blog/page.tsx +216 -216
- package/app/contact/page.tsx +284 -284
- package/app/faq/page.tsx +191 -191
- package/app/gallery/page.tsx +315 -315
- package/app/globals.css +58 -58
- package/app/layout.tsx +110 -110
- package/app/not-found.tsx +20 -20
- package/app/page.tsx +338 -338
- package/app/schedule/page.tsx +660 -660
- package/bin/init.js +219 -219
- package/components/addOns/functional/BioEditor.tsx +446 -446
- package/components/addOns/functional/CalendlyWidget.tsx +107 -107
- package/components/addOns/functional/ClassList.tsx +145 -145
- package/components/addOns/functional/ClassPopup.tsx +398 -398
- package/components/addOns/functional/ContactForm.tsx +284 -284
- package/components/addOns/functional/FileUploader.tsx +294 -294
- package/components/addOns/functional/ImageDescCarousel.tsx +730 -730
- package/components/addOns/functional/NewUserAnalytics.tsx +100 -100
- package/components/addOns/functional/ScheduleCarousel.tsx +171 -171
- package/components/addOns/functional/aboutSections/AboutSection.tsx +544 -544
- package/components/addOns/functional/aboutSections/constants/aboutSection.ts +65 -65
- package/components/addOns/functional/blogSections/BlogDashboard.tsx +184 -184
- package/components/addOns/functional/blogSections/BlogFormPopUp.tsx +554 -554
- package/components/addOns/functional/blogSections/BlogList.tsx +148 -148
- package/components/addOns/functional/blogSections/BlogSidebar.tsx +58 -58
- package/components/addOns/functional/blogSections/constants/blogDashboard.ts +28 -28
- package/components/addOns/functional/blogSections/constants/blogFormPopUp.ts +97 -97
- package/components/addOns/functional/blogSections/constants/blogList.ts +22 -22
- package/components/addOns/functional/blogSections/constants/blogSidebar.ts +15 -15
- package/components/addOns/functional/contactsDashboard/ContactsDashboard.tsx +366 -366
- package/components/addOns/functional/contactsDashboard/constants/contactsDashboard.ts +70 -70
- package/components/addOns/functional/galleries/GalleryComplex.tsx +836 -836
- package/components/addOns/functional/galleries/GallerySimple.tsx +509 -509
- package/components/addOns/functional/galleries/constants/galleryComplex.ts +106 -106
- package/components/addOns/functional/galleries/constants/gallerySimple.ts +76 -76
- package/components/addOns/functional/schedules/ScheduleGridOne.tsx +262 -262
- package/components/addOns/functional/schedules/ScheduleGridTwo.tsx +294 -294
- package/components/addOns/functional/schedules/ScheduleGridTwoBasic.tsx +288 -288
- package/components/addOns/functional/schedules/SchedulerForm.tsx +428 -428
- package/components/addOns/functional/schedules/constants/ScheduleGridTwo.ts +40 -40
- package/components/addOns/functional/schedules/constants/ScheduleGridTwoBasic.ts +40 -40
- package/components/addOns/functional/schedules/constants/SchedulerForm.ts +65 -65
- package/components/addOns/functional/schedules/constants/scheduleGridOne.ts +54 -54
- package/components/addOns/non-functional/AnnouncementBanner.tsx +46 -46
- package/components/addOns/non-functional/FeaturesSection.tsx +62 -62
- package/components/addOns/non-functional/Heros/HeroSection.tsx +142 -142
- package/components/addOns/non-functional/IconBubble.tsx +49 -49
- package/components/addOns/non-functional/SampleCarousel.tsx +204 -204
- package/components/addOns/non-functional/Testimonials.tsx +334 -334
- package/components/addOns/non-functional/ThreeSetGallery.tsx +63 -63
- package/components/addOns/non-functional/aboutSections/AboutSection.tsx +62 -62
- package/components/addOns/non-functional/aboutSections/constants/aboutSection.ts +24 -24
- package/components/addOns/non-functional/imageCarousels/ProductSlider.tsx +117 -117
- package/components/addOns/non-functional/imageCarousels/ProgramCarousel.tsx +232 -232
- package/components/addOns/non-functional/imageCarousels/constants/programCarousel.ts +39 -39
- package/components/addOns/non-functional/imageCarousels/constants/programSlider.ts +36 -36
- package/components/addOns/non-functional/spinner.tsx +21 -21
- package/components/footers/footer.tsx +453 -453
- package/components/navBars/navbar.tsx +310 -310
- package/components/other/accordion.tsx +58 -58
- package/components/other/admin-menu.tsx +68 -68
- package/components/other/alert-dialog.tsx +141 -141
- package/components/other/alert.tsx +59 -59
- package/components/other/aspect-ratio.tsx +7 -7
- package/components/other/avatar.tsx +50 -50
- package/components/other/badge.tsx +36 -36
- package/components/other/breadcrumb.tsx +115 -115
- package/components/other/button.tsx +738 -738
- package/components/other/calendar.tsx +66 -66
- package/components/other/card.tsx +86 -86
- package/components/other/carousel.tsx +274 -274
- package/components/other/chart.tsx +363 -363
- package/components/other/checkbox.tsx +30 -30
- package/components/other/collapsible.tsx +11 -11
- package/components/other/command.tsx +155 -155
- package/components/other/context-menu.tsx +200 -200
- package/components/other/dialog.tsx +122 -122
- package/components/other/drawer.tsx +118 -118
- package/components/other/dropdown-menu.tsx +200 -200
- package/components/other/form.tsx +179 -179
- package/components/other/hover-card.tsx +29 -29
- package/components/other/input-otp.tsx +71 -71
- package/components/other/input.tsx +25 -25
- package/components/other/label.tsx +26 -26
- package/components/other/menubar.tsx +236 -236
- package/components/other/mobile-icon.tsx +21 -21
- package/components/other/navigation-menu.tsx +128 -128
- package/components/other/pagination.tsx +117 -117
- package/components/other/popover.tsx +31 -31
- package/components/other/progress.tsx +28 -28
- package/components/other/radio-group.tsx +44 -44
- package/components/other/resizable.tsx +45 -45
- package/components/other/scroll-area.tsx +48 -48
- package/components/other/select.tsx +160 -160
- package/components/other/separator.tsx +31 -31
- package/components/other/sheet.tsx +140 -140
- package/components/other/skeleton.tsx +15 -15
- package/components/other/slider.tsx +28 -28
- package/components/other/social-icons.tsx +39 -39
- package/components/other/sonner.tsx +31 -31
- package/components/other/switch.tsx +29 -29
- package/components/other/table.tsx +117 -117
- package/components/other/tabs.tsx +55 -55
- package/components/other/textarea.tsx +24 -24
- package/components/other/toast.tsx +122 -122
- package/components/other/toaster.tsx +35 -35
- package/components/other/toggle-group.tsx +61 -61
- package/components/other/toggle.tsx +45 -45
- package/components/other/tooltip.tsx +30 -30
- package/components/theme-provider.tsx +8 -8
- package/components/types.ts +49 -49
- package/dist/.next/types/app/api/about/route.js +52 -0
- package/dist/.next/types/app/api/blog/route.js +52 -0
- package/dist/.next/types/app/api/files/route.js +52 -0
- package/dist/.next/types/app/api/schedule/route.js +52 -0
- package/dist/.next/types/app/api/sync-user/route.js +52 -0
- package/dist/.next/types/app/layout.js +22 -0
- package/dist/.next/types/app/page.js +22 -0
- package/dist/app/about/page.jsx +258 -0
- package/dist/app/adRequest/page.jsx +531 -0
- package/dist/app/analytics/page.jsx +298 -0
- package/dist/app/api/about/route.js +285 -0
- package/dist/app/api/adRequest/route.js +440 -0
- package/dist/app/api/analytics/[reportType]/route.js +357 -0
- package/dist/app/api/bio/route.js +293 -0
- package/dist/app/api/blog/route.js +366 -0
- package/dist/app/api/chat/route.js +58 -0
- package/dist/app/api/contact/route.js +163 -0
- package/dist/app/api/contacts/route.js +234 -0
- package/dist/app/api/files/route.js +444 -0
- package/dist/app/api/gallery-data/route.js +719 -0
- package/dist/app/api/schedule/route.js +461 -0
- package/dist/app/api/sync-user/route.js +186 -0
- package/dist/app/api/trial-request/route.js +165 -0
- package/dist/app/blog/[id]/page.jsx +312 -0
- package/dist/app/blog/page.jsx +210 -0
- package/dist/app/constants/about.js +32 -0
- package/dist/app/constants/adRequest.js +113 -0
- package/dist/app/constants/contact.js +40 -0
- package/dist/app/constants/faq.js +36 -0
- package/dist/app/constants/gallery.js +42 -0
- package/dist/app/constants/page.js +69 -0
- package/dist/app/constants/schedule.js +71 -0
- package/dist/app/contact/page.jsx +119 -0
- package/dist/app/faq/page.jsx +97 -0
- package/dist/app/gallery/page.jsx +281 -0
- package/dist/app/layout.jsx +45 -0
- package/dist/app/not-found.jsx +14 -0
- package/dist/app/page.jsx +324 -0
- package/dist/app/schedule/page.jsx +500 -0
- package/dist/components/addOns/functional/BioEditor.jsx +187 -0
- package/dist/components/addOns/functional/CalendlyWidget.jsx +61 -0
- package/dist/components/addOns/functional/ClassList.jsx +158 -0
- package/dist/components/addOns/functional/ClassPopup.jsx +300 -0
- package/dist/components/addOns/functional/ContactForm.jsx +219 -0
- package/dist/components/addOns/functional/FileUploader.jsx +222 -0
- package/dist/components/addOns/functional/ImageDescCarousel.jsx +491 -0
- package/dist/components/addOns/functional/NewUserAnalytics.jsx +71 -0
- package/dist/components/addOns/functional/ScheduleCarousel.jsx +68 -0
- package/dist/components/addOns/functional/aboutSections/AboutSection.jsx +372 -0
- package/dist/components/addOns/functional/aboutSections/constants/aboutSection.js +65 -0
- package/dist/components/addOns/functional/blogSections/BlogDashboard.jsx +111 -0
- package/dist/components/addOns/functional/blogSections/BlogFormPopUp.jsx +465 -0
- package/dist/components/addOns/functional/blogSections/BlogList.jsx +170 -0
- package/dist/components/addOns/functional/blogSections/BlogSidebar.jsx +35 -0
- package/dist/components/addOns/functional/blogSections/constants/blogDashboard.js +28 -0
- package/dist/components/addOns/functional/blogSections/constants/blogFormPopUp.js +97 -0
- package/dist/components/addOns/functional/blogSections/constants/blogList.js +22 -0
- package/dist/components/addOns/functional/blogSections/constants/blogSidebar.js +15 -0
- package/dist/components/addOns/functional/contactsDashboard/ContactsDashboard.jsx +355 -0
- package/dist/components/addOns/functional/contactsDashboard/constants/contactsDashboard.js +70 -0
- package/dist/components/addOns/functional/galleries/GalleryComplex.jsx +605 -0
- package/dist/components/addOns/functional/galleries/GallerySimple.jsx +363 -0
- package/dist/components/addOns/functional/galleries/constants/galleryComplex.js +106 -0
- package/dist/components/addOns/functional/galleries/constants/gallerySimple.js +76 -0
- package/dist/components/addOns/functional/schedules/ScheduleGridOne.jsx +167 -0
- package/dist/components/addOns/functional/schedules/ScheduleGridTwo.jsx +100 -0
- package/dist/components/addOns/functional/schedules/ScheduleGridTwoBasic.jsx +97 -0
- package/dist/components/addOns/functional/schedules/SchedulerForm.jsx +188 -0
- package/dist/components/addOns/functional/schedules/constants/ScheduleGridTwo.js +40 -0
- package/dist/components/addOns/functional/schedules/constants/ScheduleGridTwoBasic.js +40 -0
- package/dist/components/addOns/functional/schedules/constants/SchedulerForm.js +65 -0
- package/dist/components/addOns/functional/schedules/constants/scheduleGridOne.js +54 -0
- package/dist/components/addOns/non-functional/AnnouncementBanner.jsx +24 -0
- package/dist/components/addOns/non-functional/FeaturesSection.jsx +38 -0
- package/dist/components/addOns/non-functional/HeroSection.jsx +71 -0
- package/dist/components/addOns/non-functional/Heros/HeroSection.jsx +71 -0
- package/dist/components/addOns/non-functional/IconBubble.jsx +36 -0
- package/dist/components/addOns/non-functional/SampleCarousel.jsx +114 -0
- package/dist/components/addOns/non-functional/Testimonials.jsx +177 -0
- package/dist/components/addOns/non-functional/ThreeSetGallery.jsx +40 -0
- package/dist/components/addOns/non-functional/aboutSections/AboutSection.jsx +35 -0
- package/dist/components/addOns/non-functional/aboutSections/constants/aboutSection.js +24 -0
- package/dist/components/addOns/non-functional/imageCarousels/ProductSlider.jsx +80 -0
- package/dist/components/addOns/non-functional/imageCarousels/ProgramCarousel.jsx +155 -0
- package/dist/components/addOns/non-functional/imageCarousels/constants/programCarousel.js +39 -0
- package/dist/components/addOns/non-functional/imageCarousels/constants/programSlider.js +36 -0
- package/dist/components/addOns/non-functional/spinner.jsx +13 -0
- package/dist/components/footers/footer.jsx +217 -0
- package/dist/components/navBars/navbar.jsx +159 -0
- package/dist/components/other/accordion.jsx +40 -0
- package/dist/components/other/admin-menu.jsx +34 -0
- package/dist/components/other/alert-dialog.jsx +64 -0
- package/dist/components/other/alert.jsx +41 -0
- package/dist/components/other/aspect-ratio.jsx +4 -0
- package/dist/components/other/avatar.jsx +31 -0
- package/dist/components/other/badge.jsx +32 -0
- package/dist/components/other/breadcrumb.jsx +57 -0
- package/dist/components/other/button.jsx +322 -0
- package/dist/components/other/calendar.jsx +43 -0
- package/dist/components/other/card.jsx +44 -0
- package/dist/components/other/carousel.jsx +140 -0
- package/dist/components/other/chart.jsx +182 -0
- package/dist/components/other/checkbox.jsx +26 -0
- package/dist/components/other/collapsible.jsx +6 -0
- package/dist/components/other/command.jsx +68 -0
- package/dist/components/other/context-menu.jsx +88 -0
- package/dist/components/other/dialog.jsx +60 -0
- package/dist/components/other/drawer.jsx +60 -0
- package/dist/components/other/dropdown-menu.jsx +90 -0
- package/dist/components/other/form.jsx +89 -0
- package/dist/components/other/hover-card.jsx +23 -0
- package/dist/components/other/input-otp.jsx +46 -0
- package/dist/components/other/input.jsx +19 -0
- package/dist/components/other/label.jsx +23 -0
- package/dist/components/other/login-popup.jsx +1 -0
- package/dist/components/other/menubar.jsx +96 -0
- package/dist/components/other/mobile-icon.jsx +11 -0
- package/dist/components/other/navigation-menu.jsx +62 -0
- package/dist/components/other/pagination.jsx +63 -0
- package/dist/components/other/popover.jsx +25 -0
- package/dist/components/other/progress.jsx +23 -0
- package/dist/components/other/radio-group.jsx +31 -0
- package/dist/components/other/resizable.jsx +29 -0
- package/dist/components/other/scroll-area.jsx +36 -0
- package/dist/components/other/select.jsx +83 -0
- package/dist/components/other/separator.jsx +21 -0
- package/dist/components/other/sheet.jsx +74 -0
- package/dist/components/other/signup-popup.jsx +1 -0
- package/dist/components/other/skeleton.jsx +17 -0
- package/dist/components/other/slider.jsx +26 -0
- package/dist/components/other/social-icons.jsx +15 -0
- package/dist/components/other/sonner.jsx +27 -0
- package/dist/components/other/switch.jsx +23 -0
- package/dist/components/other/table.jsx +56 -0
- package/dist/components/other/tabs.jsx +32 -0
- package/dist/components/other/textarea.jsx +19 -0
- package/dist/components/other/toast.jsx +58 -0
- package/dist/components/other/toaster.jsx +31 -0
- package/dist/components/other/toggle-group.jsx +41 -0
- package/dist/components/other/toggle.jsx +39 -0
- package/dist/components/other/tooltip.jsx +24 -0
- package/dist/components/theme-provider.jsx +18 -0
- package/dist/components/types.js +1 -0
- package/dist/hooks/use-toast.js +135 -0
- package/dist/lib/auth-context.jsx +144 -0
- package/dist/lib/constants/about.js +32 -0
- package/dist/lib/constants/adRequest.js +113 -0
- package/dist/lib/constants/contact.js +40 -0
- package/dist/lib/constants/faq.js +36 -0
- package/dist/lib/constants/gallery.js +42 -0
- package/dist/lib/constants/page.js +69 -0
- package/dist/lib/constants/schedule.js +71 -0
- package/dist/lib/google-analytics.jsx +148 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/verify-user.js +142 -0
- package/dist/middleware.js +37 -0
- package/dist/tailwind.config.js +86 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/hooks/use-toast.ts +188 -188
- package/lib/auth-context.tsx +130 -130
- package/lib/constants/about.ts +34 -34
- package/lib/constants/adRequest.ts +113 -113
- package/lib/constants/contact.ts +40 -40
- package/lib/constants/faq.ts +34 -21
- package/lib/constants/gallery.ts +42 -42
- package/lib/constants/page.ts +69 -69
- package/lib/constants/schedule.ts +71 -71
- package/lib/google-analytics.tsx +97 -97
- package/lib/verify-user.ts +117 -117
- package/middleware.ts +42 -42
- package/netlify.toml +5 -5
- package/next.config.js +10 -10
- package/package.json +115 -115
- package/tailwind.config.ts +89 -89
- package/tsconfig.json +23 -23
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
3
|
+
import { useForm } from "react-hook-form";
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { Card } from "@/components/other/card";
|
|
6
|
+
import { toast } from "@/hooks/use-toast";
|
|
7
|
+
import { MapPin, Phone, Mail } from "lucide-react";
|
|
8
|
+
import { useEffect, useState, useRef } from "react";
|
|
9
|
+
import { motion } from "framer-motion";
|
|
10
|
+
import Spinner from "@/components/addOns/non-functional/spinner";
|
|
11
|
+
import ContactForm from "@/components/addOns/functional/ContactForm";
|
|
12
|
+
import { CONTACT_PAGE } from "../../lib/constants/contact";
|
|
13
|
+
var formSchema = z.object({
|
|
14
|
+
name: z.string().min(2, { message: CONTACT_PAGE.ERRORS.NAME_VALIDATION_ERROR }),
|
|
15
|
+
email: z.string().email({ message: CONTACT_PAGE.ERRORS.EMAIL_VALIDATION_ERROR }),
|
|
16
|
+
message: z.string().min(10, { message: CONTACT_PAGE.ERRORS.MESSAGE_VALIDATION_ERROR }),
|
|
17
|
+
});
|
|
18
|
+
export default function ContactPage() {
|
|
19
|
+
var _a = useState(true), isIframeLoading = _a[0], setIsIframeLoading = _a[1];
|
|
20
|
+
var _b = useState(false), isLoading = _b[0], setIsLoading = _b[1];
|
|
21
|
+
var containerRef = useRef(null);
|
|
22
|
+
useEffect(function () {
|
|
23
|
+
var timer = setTimeout(function () {
|
|
24
|
+
setIsIframeLoading(false);
|
|
25
|
+
}, 300);
|
|
26
|
+
return function () { return clearTimeout(timer); };
|
|
27
|
+
}, []);
|
|
28
|
+
var form = useForm({
|
|
29
|
+
resolver: zodResolver(formSchema),
|
|
30
|
+
defaultValues: { name: "", email: "", message: "" },
|
|
31
|
+
});
|
|
32
|
+
function onSubmit(values) {
|
|
33
|
+
toast({
|
|
34
|
+
title: CONTACT_PAGE.ERRORS.TOAST_SUCCESS_TITLE,
|
|
35
|
+
description: CONTACT_PAGE.ERRORS.TOAST_SUCCESS_DESCRIPTION,
|
|
36
|
+
});
|
|
37
|
+
form.reset();
|
|
38
|
+
}
|
|
39
|
+
if (isLoading) {
|
|
40
|
+
return <Spinner />;
|
|
41
|
+
}
|
|
42
|
+
return (<div className="min-h-screen w-full relative overflow-hidden flex flex-col">
|
|
43
|
+
<style jsx>{"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');\n\n :root {\n --jubilee: #F47C7C;\n --natural-white: #F7F7F7;\n --caviar: #2D2D2D;\n --storm-cloud: #4A636E;\n --exuberant-blue: #FF69B4;\n --modern-purple: #D946EF;\n }\n\n * {\n font-family: 'Inter', system-ui, sans-serif;\n }\n\n .gradient-text {\n background: linear-gradient(135deg, var(--exuberant-blue), var(--jubilee), var(--modern-purple));\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);\n }\n\n .glassmorphism {\n background: rgba(255, 255, 255, 0.08);\n backdrop-filter: blur(10px);\n -webkit-backdrop-filter: blur(10px);\n border: 2px solid transparent;\n border-image: linear-gradient(45deg, var(--exuberant-blue), var(--jubilee), var(--modern-purple)) 1;\n box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);\n }\n\n .iframe-container {\n overflow: hidden;\n padding: 0;\n margin: 0;\n width: 100%;\n height: 110%;\n min-height: 600px;\n }\n\n .iframe-container iframe {\n display: block;\n object-fit: contain;\n overflow: hidden;\n padding: 0;\n margin: 0;\n border: none;\n width: 105%;\n height: 100%;\n }\n\n .map-container {\n width: 100%;\n height: 500px;\n border-radius: 1.5rem;\n overflow: hidden;\n position: relative;\n }\n\n .map-container iframe {\n width: 100%;\n height: 100%;\n border: none;\n }\n\n .main-heading {\n font-size: 3rem;\n margin-bottom: 3rem;\n }\n\n .section-heading {\n font-size: 2.5rem;\n }\n\n .iframe-container {\n min-height: 600px; \n }\n\n .map-container {\n height: 400px;\n }\n\n .contact-text {\n font-size: 1.25rem;\n }\n\n .hours-heading {\n font-size: 1.75rem;\n }\n }\n\n .main-heading {\n font-size: 2.5rem;\n }\n\n .section-heading {\n font-size: 2rem;\n }\n\n .iframe-container {\n min-height: 600px;\n padding: 0;\n margin: 0;\n width: 100%;\n }\n\n .iframe-container iframe {\n padding: 0;\n margin: 0;\n width: 100%;\n height: 100%;\n transform: none;\n }\n\n .map-container {\n max-width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n\n .contact-text {\n font-size: 1rem;\n }\n\n .hours-heading {\n font-size: 1.5rem;\n }\n }\n "}</style>
|
|
44
|
+
<div className="w-full pt-20 lg:pt-40 flex-grow relative z-10 container-padding bg-white">
|
|
45
|
+
<motion.h1 initial={{ opacity: 0, y: -50 }} animate={{ opacity: 1, y: 0 }} className="text-4xl sm:text-5xl lg:text-7xl font-black mb-20 lg:mb-20 gradient-text text-center uppercase drop-shadow-lg main-heading pt-36 sm:pt-32">
|
|
46
|
+
{CONTACT_PAGE.UI.MAIN_HEADING}
|
|
47
|
+
</motion.h1>
|
|
48
|
+
|
|
49
|
+
<div className="grid lg:grid-cols-2 gap-8 bg-gradient-to-b rounded-[2rem] lg:p-12 h-full mb-40 px-4">
|
|
50
|
+
{/* Contact Form */}
|
|
51
|
+
<div>
|
|
52
|
+
<div className="relative w-full iframe-container">
|
|
53
|
+
{isIframeLoading && (<div className="absolute inset-0 flex flex-col items-center justify-center bg-[#F7F7F7]/90 rounded-[1.5rem] z-20">
|
|
54
|
+
<div className="w-10 h-10 border-4 border-t-4 border-gray-300 border-t-[#FF69B4] rounded-full animate-spin"></div>
|
|
55
|
+
<p className="text-gray-700 mt-3 text-xl font-bold">{CONTACT_PAGE.UI.LOADING_TEXT}</p>
|
|
56
|
+
</div>)}
|
|
57
|
+
{/* <iframe
|
|
58
|
+
src="https://contact-form-devvista-kit.netlify.app/"
|
|
59
|
+
className={`w-full h-full rounded-[1.5rem] border-0 transition-opacity duration-500 ${isIframeLoading ? "opacity-0" : "opacity-100"}`}
|
|
60
|
+
title="Contact Form"
|
|
61
|
+
allowFullScreen
|
|
62
|
+
loading="lazy"
|
|
63
|
+
></iframe> */}
|
|
64
|
+
<ContactForm />
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
{/* Contact Info */}
|
|
68
|
+
<div className="px-4">
|
|
69
|
+
<h2 className="text-4xl sm:text-5xl font-black mb-8 lg:mb-12 uppercase section-heading pt-24 pl-4">
|
|
70
|
+
{CONTACT_PAGE.UI.CONTACT_INFO_HEADING}
|
|
71
|
+
</h2>
|
|
72
|
+
<Card className="p-8 lg:p-12 glassmorphism rounded-[2rem] shadow-4xl w-full">
|
|
73
|
+
<div className="space-y-6">
|
|
74
|
+
<div className="flex items-center space-x-4">
|
|
75
|
+
<MapPin className="h-6 w-6 text-[#FF69B4] drop-shadow-lg"/>
|
|
76
|
+
<p className="text-gray-700 text-xl sm:text-2xl font-bold drop-shadow-md contact-text">
|
|
77
|
+
{CONTACT_PAGE.UI.ADDRESS}
|
|
78
|
+
</p>
|
|
79
|
+
</div>
|
|
80
|
+
<div className="flex items-center space-x-4">
|
|
81
|
+
<Phone className="h-6 w-6 text-[#FF69B4] drop-shadow-lg"/>
|
|
82
|
+
<div className="space-y-2">
|
|
83
|
+
<a href={"tel:".concat(CONTACT_PAGE.UI.PHONE_1)} className="text-gray-700 text-xl sm:text-2xl font-bold hover:text-[#FF69B4] transition-all duration-200 drop-shadow-md contact-text">
|
|
84
|
+
{CONTACT_PAGE.UI.PHONE_1}
|
|
85
|
+
</a>
|
|
86
|
+
<br />
|
|
87
|
+
<a href={"tel:".concat(CONTACT_PAGE.UI.PHONE_2)} className="text-gray-700 text-xl sm:text-2xl font-bold hover:text-[#FF69B4] transition-all duration-200 drop-shadow-md contact-text">
|
|
88
|
+
{CONTACT_PAGE.UI.PHONE_2}
|
|
89
|
+
</a>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div className="flex items-center space-x-4">
|
|
93
|
+
<Mail className="h-6 w-6 text-[#FF69B4] drop-shadow-lg"/>
|
|
94
|
+
<a href={"mailto:".concat(CONTACT_PAGE.UI.SUPPORT_EMAIL)} className="text-gray-700 text-xl sm:text-2xl font-bold hover:text-[#FF69B4] transition-all duration-200 drop-shadow-md contact-text">
|
|
95
|
+
{CONTACT_PAGE.UI.SUPPORT_EMAIL}
|
|
96
|
+
</a>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div className="mt-6">
|
|
100
|
+
<h3 className="text-2xl sm:text-3xl font-black mb-4 uppercase pb-2 hours-heading">
|
|
101
|
+
{CONTACT_PAGE.UI.HOURS_HEADING}
|
|
102
|
+
</h3>
|
|
103
|
+
<p className="text-gray-700 text-xl sm:text-2xl font-bold drop-shadow-md contact-text">
|
|
104
|
+
{CONTACT_PAGE.UI.HOURS_TEXT}
|
|
105
|
+
</p>
|
|
106
|
+
</div>
|
|
107
|
+
</Card>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
{/* Map Section */}
|
|
112
|
+
<div className="py-32 lg:mt-20 bg-[#1B2743] w-full">
|
|
113
|
+
<div className="map-container glassmorphism w-full max-w-[95%] mx-auto">
|
|
114
|
+
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2914.8248046145767!2d-76.07309392369562!3d43.06558317113779!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89d9f3b7c0a5b8f5%3A0x7f0b47a6628a12e0!2s215%20W%20Manlius%20St%2C%20East%20Syracuse%2C%20NY%2013057%2C%20USA!5e0!3m2!1sen!2s!4v1698675309866!5m2!1sen!2s" allowFullScreen loading="lazy" title={CONTACT_PAGE.UI.MAP_TITLE} className="w-full h-[1000px] lg:h-[1200px]"></iframe>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</div>);
|
|
119
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { motion } from "framer-motion";
|
|
3
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@/components/other/accordion";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { FAQ_PAGE } from "../../lib/constants/faq";
|
|
6
|
+
export default function FAQPage() {
|
|
7
|
+
var _a = useState(false), isMobile = _a[0], setIsMobile = _a[1];
|
|
8
|
+
useEffect(function () {
|
|
9
|
+
var checkMobile = function () {
|
|
10
|
+
var mobile = window.innerWidth < 768;
|
|
11
|
+
setIsMobile(mobile);
|
|
12
|
+
};
|
|
13
|
+
checkMobile();
|
|
14
|
+
window.addEventListener("resize", checkMobile);
|
|
15
|
+
return function () { return window.removeEventListener("resize", checkMobile); };
|
|
16
|
+
}, []);
|
|
17
|
+
var sectionVariants = {
|
|
18
|
+
hidden: { opacity: 0, y: 20 },
|
|
19
|
+
visible: {
|
|
20
|
+
opacity: 1,
|
|
21
|
+
y: 0,
|
|
22
|
+
transition: { duration: isMobile ? 0.3 : 0.5, ease: "easeOut" },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
var itemVariants = {
|
|
26
|
+
hidden: { opacity: 0, y: 10 },
|
|
27
|
+
visible: {
|
|
28
|
+
opacity: 1,
|
|
29
|
+
y: 0,
|
|
30
|
+
transition: { duration: isMobile ? 0.3 : 0.5, ease: "easeOut" },
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
var faqs = [
|
|
34
|
+
{
|
|
35
|
+
question: FAQ_PAGE.UI.FAQ_1_QUESTION,
|
|
36
|
+
answer: FAQ_PAGE.UI.FAQ_1_ANSWER,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
question: FAQ_PAGE.UI.FAQ_2_QUESTION,
|
|
40
|
+
answer: FAQ_PAGE.UI.FAQ_2_ANSWER,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
question: FAQ_PAGE.UI.FAQ_3_QUESTION,
|
|
44
|
+
answer: FAQ_PAGE.UI.FAQ_3_ANSWER,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
question: FAQ_PAGE.UI.FAQ_4_QUESTION,
|
|
48
|
+
answer: FAQ_PAGE.UI.FAQ_4_ANSWER,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
question: FAQ_PAGE.UI.FAQ_5_QUESTION,
|
|
52
|
+
answer: FAQ_PAGE.UI.FAQ_5_ANSWER,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
question: FAQ_PAGE.UI.FAQ_6_QUESTION,
|
|
56
|
+
answer: FAQ_PAGE.UI.FAQ_6_ANSWER,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
question: FAQ_PAGE.UI.FAQ_7_QUESTION,
|
|
60
|
+
answer: FAQ_PAGE.UI.FAQ_7_ANSWER,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
question: FAQ_PAGE.UI.FAQ_8_QUESTION,
|
|
64
|
+
answer: FAQ_PAGE.UI.FAQ_8_ANSWER,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
question: FAQ_PAGE.UI.FAQ_9_QUESTION,
|
|
68
|
+
answer: FAQ_PAGE.UI.FAQ_9_ANSWER,
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
return (<div className="min-h-screen w-full bg-[#F7F7F7] flex flex-col">
|
|
72
|
+
<style jsx>{"\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap\");\n\n :root {\n --jubilee: #F47C7C;\n --natural-white: #F7F7F7;\n --caviar: #2D2D2D;\n --storm-cloud: #4A636E;\n --exuberant-blue: #FF69B4;\n --modern-purple: #D946EF;\n }\n\n * {\n font-family: \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\",\n Roboto, sans-serif;\n }\n\n .gradient-text {\n background: linear-gradient(\n 135deg,\n var(--exuberant-blue),\n var(--jubilee),\n var(--modern-purple)\n );\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n }\n\n .glassmorphism {\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);\n transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;\n }\n\n @supports not (backdrop-filter: blur(12px)) {\n .glassmorphism {\n background: rgba(255, 255, 255, 0.3);\n }\n }\n\n .glassmorphism:hover {\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);\n }\n\n @media (max-width: 768px) {\n .glassmorphism {\n padding: 1rem;\n }\n .gradient-text {\n font-size: 2.5rem;\n }\n }\n "}</style>
|
|
73
|
+
|
|
74
|
+
<div className="w-full px-6 py-20 lg:px-12 lg:py-40 flex-grow relative z-10 container-padding bg-white">
|
|
75
|
+
<motion.h1 initial={{ opacity: 0, y: -50 }} animate={{ opacity: 1, y: 0 }} className="text-4xl sm:text-5xl lg:text-7xl font-black mb-20 lg:mb-20 gradient-text text-center uppercase drop-shadow-lg main-heading pt-36 sm:pt-32">
|
|
76
|
+
{FAQ_PAGE.UI.MAIN_HEADING}
|
|
77
|
+
</motion.h1>
|
|
78
|
+
|
|
79
|
+
<motion.div variants={sectionVariants} initial="hidden" whileInView="visible" viewport={{ once: true, amount: 0.2 }} className="max-w-4xl mx-auto">
|
|
80
|
+
<Accordion type="single" collapsible className="w-full">
|
|
81
|
+
{faqs.map(function (faq, index) { return (<AccordionItem key={index} value={"item-".concat(index)} className="mb-6 border-none">
|
|
82
|
+
<AccordionTrigger className="text-left text-lg sm:text-xl lg:text-2xl font-extrabold uppercase tracking-tight text-gray-800 p-6 rounded-3xl glassmorphism hover:shadow-2xl transition-all duration-200" style={{
|
|
83
|
+
fontSize: "clamp(1.125rem, 4vw, 1.5rem)",
|
|
84
|
+
}}>
|
|
85
|
+
{faq.question}
|
|
86
|
+
</AccordionTrigger>
|
|
87
|
+
<AccordionContent className="text-gray-800 text-base sm:text-lg leading-relaxed font-medium p-6 rounded-b-3xl glassmorphism" style={{
|
|
88
|
+
fontSize: "clamp(0.875rem, 3vw, 1.125rem)",
|
|
89
|
+
}}>
|
|
90
|
+
{faq.answer}
|
|
91
|
+
</AccordionContent>
|
|
92
|
+
</AccordionItem>); })}
|
|
93
|
+
</Accordion>
|
|
94
|
+
</motion.div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>);
|
|
97
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// src/pages/gallery.tsx
|
|
2
|
+
"use client";
|
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
13
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
14
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
15
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
16
|
+
function step(op) {
|
|
17
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
18
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
19
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
20
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
21
|
+
switch (op[0]) {
|
|
22
|
+
case 0: case 1: t = op; break;
|
|
23
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
24
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
25
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
26
|
+
default:
|
|
27
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
28
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
29
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
30
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
31
|
+
if (t[2]) _.ops.pop();
|
|
32
|
+
_.trys.pop(); continue;
|
|
33
|
+
}
|
|
34
|
+
op = body.call(thisArg, _);
|
|
35
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
36
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
import { useState, useEffect, useCallback } from "react";
|
|
40
|
+
import { ImageDescCarousel } from "@/components/addOns/functional/ImageDescCarousel";
|
|
41
|
+
import { GallerySection } from "@/components/addOns/functional/galleries/GalleryComplex";
|
|
42
|
+
import Spinner from "@/components/addOns/non-functional/spinner";
|
|
43
|
+
import { motion } from "framer-motion";
|
|
44
|
+
import { useStrapiAuth } from "@/lib/auth-context";
|
|
45
|
+
import { useAuth } from "@clerk/nextjs";
|
|
46
|
+
import { GALLERY_PAGE } from "../../lib/constants/gallery";
|
|
47
|
+
export default function GalleryPage() {
|
|
48
|
+
var _this = this;
|
|
49
|
+
var _a = useStrapiAuth(), user = _a.user, authLoading = _a.authLoading, checkSession = _a.checkSession;
|
|
50
|
+
var _b = useAuth(), isSignedIn = _b.isSignedIn, getToken = _b.getToken;
|
|
51
|
+
var _c = useState(true), isLoading = _c[0], setIsLoading = _c[1];
|
|
52
|
+
var _d = useState(null), error = _d[0], setError = _d[1];
|
|
53
|
+
var _e = useState([]), currentUploadedImages = _e[0], setUploadedImages = _e[1];
|
|
54
|
+
var _f = useState(null), galleryUser = _f[0], setUser = _f[1];
|
|
55
|
+
var isAdmin = isSignedIn && !!(user === null || user === void 0 ? void 0 : user.businessAdminId);
|
|
56
|
+
var filteredImages = currentUploadedImages;
|
|
57
|
+
useEffect(function () {
|
|
58
|
+
setUser(user);
|
|
59
|
+
}, [user]);
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
window.scrollTo(0, 0);
|
|
62
|
+
}, []);
|
|
63
|
+
useEffect(function () {
|
|
64
|
+
var handleLogin = function () { return checkSession(); };
|
|
65
|
+
var handleLogout = function () { return checkSession(); };
|
|
66
|
+
window.addEventListener("user-login", handleLogin);
|
|
67
|
+
window.addEventListener("user-logout", handleLogout);
|
|
68
|
+
return function () {
|
|
69
|
+
window.removeEventListener("user-login", handleLogin);
|
|
70
|
+
window.removeEventListener("user-logout", handleLogout);
|
|
71
|
+
};
|
|
72
|
+
}, [checkSession]);
|
|
73
|
+
var fetchInitialData = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
74
|
+
var headers, token, imagesResponse, errorText, _a, images, meta, err_1;
|
|
75
|
+
var _b;
|
|
76
|
+
return __generator(this, function (_c) {
|
|
77
|
+
switch (_c.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
_c.trys.push([0, 7, 8, 9]);
|
|
80
|
+
setIsLoading(true);
|
|
81
|
+
headers = { "Content-Type": "application/json" };
|
|
82
|
+
if (!isSignedIn) return [3 /*break*/, 2];
|
|
83
|
+
return [4 /*yield*/, getToken()];
|
|
84
|
+
case 1:
|
|
85
|
+
token = _c.sent();
|
|
86
|
+
if (!token) {
|
|
87
|
+
throw new Error(GALLERY_PAGE.ERRORS.NO_AUTH_TOKEN);
|
|
88
|
+
}
|
|
89
|
+
headers.Authorization = "Bearer ".concat(token);
|
|
90
|
+
_c.label = 2;
|
|
91
|
+
case 2: return [4 /*yield*/, fetch("/api/gallery-data", {
|
|
92
|
+
headers: headers,
|
|
93
|
+
})];
|
|
94
|
+
case 3:
|
|
95
|
+
imagesResponse = _c.sent();
|
|
96
|
+
if (!!imagesResponse.ok) return [3 /*break*/, 5];
|
|
97
|
+
return [4 /*yield*/, imagesResponse.text()];
|
|
98
|
+
case 4:
|
|
99
|
+
errorText = _c.sent();
|
|
100
|
+
console.error("GalleryPage: Fetch images failed", { status: imagesResponse.status, errorText: errorText });
|
|
101
|
+
throw new Error(GALLERY_PAGE.ERRORS.FETCH_IMAGES_FAILED.replace("${errorText}", errorText));
|
|
102
|
+
case 5: return [4 /*yield*/, imagesResponse.json()];
|
|
103
|
+
case 6:
|
|
104
|
+
_a = _c.sent(), images = _a.data, meta = _a.meta;
|
|
105
|
+
if (((_b = meta === null || meta === void 0 ? void 0 : meta.pagination) === null || _b === void 0 ? void 0 : _b.total) > 100) {
|
|
106
|
+
setError(GALLERY_PAGE.ERRORS.PAGINATION_WARNING);
|
|
107
|
+
}
|
|
108
|
+
setUploadedImages(images || []);
|
|
109
|
+
return [3 /*break*/, 9];
|
|
110
|
+
case 7:
|
|
111
|
+
err_1 = _c.sent();
|
|
112
|
+
console.error("GalleryPage: Fetch error", err_1);
|
|
113
|
+
setError(err_1 instanceof Error ? err_1.message : GALLERY_PAGE.ERRORS.FETCH_ERROR);
|
|
114
|
+
return [3 /*break*/, 9];
|
|
115
|
+
case 8:
|
|
116
|
+
setIsLoading(false);
|
|
117
|
+
return [7 /*endfinally*/];
|
|
118
|
+
case 9: return [2 /*return*/];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}); }, [isSignedIn, getToken]);
|
|
122
|
+
useEffect(function () {
|
|
123
|
+
fetchInitialData();
|
|
124
|
+
}, [fetchInitialData]);
|
|
125
|
+
var handleImageUpload = function (e, file, title, description, category) { return __awaiter(_this, void 0, void 0, function () {
|
|
126
|
+
var token, formData, response, errorData, data, err_2;
|
|
127
|
+
return __generator(this, function (_a) {
|
|
128
|
+
switch (_a.label) {
|
|
129
|
+
case 0:
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
if (!file) {
|
|
132
|
+
setError(GALLERY_PAGE.ERRORS.NO_FILE_SELECTED);
|
|
133
|
+
return [2 /*return*/];
|
|
134
|
+
}
|
|
135
|
+
if (!["image/jpeg", "image/png", "image/gif"].includes(file.type)) {
|
|
136
|
+
setError(GALLERY_PAGE.ERRORS.INVALID_FILE_TYPE);
|
|
137
|
+
return [2 /*return*/];
|
|
138
|
+
}
|
|
139
|
+
if (!isAdmin) {
|
|
140
|
+
console.error("GalleryPage: Unauthorized upload attempt", {
|
|
141
|
+
isSignedIn: isSignedIn,
|
|
142
|
+
businessAdminId: user === null || user === void 0 ? void 0 : user.businessAdminId,
|
|
143
|
+
});
|
|
144
|
+
setError(GALLERY_PAGE.ERRORS.UNAUTHORIZED_UPLOAD);
|
|
145
|
+
return [2 /*return*/];
|
|
146
|
+
}
|
|
147
|
+
_a.label = 1;
|
|
148
|
+
case 1:
|
|
149
|
+
_a.trys.push([1, 7, 8, 9]);
|
|
150
|
+
setIsLoading(true);
|
|
151
|
+
return [4 /*yield*/, getToken()];
|
|
152
|
+
case 2:
|
|
153
|
+
token = _a.sent();
|
|
154
|
+
if (!token) {
|
|
155
|
+
setError(GALLERY_PAGE.ERRORS.AUTHENTICATION_ERROR);
|
|
156
|
+
return [2 /*return*/];
|
|
157
|
+
}
|
|
158
|
+
formData = new FormData();
|
|
159
|
+
formData.append("file", file);
|
|
160
|
+
formData.append("title", title || "Image ".concat(new Date().toISOString()));
|
|
161
|
+
formData.append("description", description || "");
|
|
162
|
+
formData.append("category", category);
|
|
163
|
+
return [4 /*yield*/, fetch("/api/gallery-data", {
|
|
164
|
+
method: "POST",
|
|
165
|
+
headers: {
|
|
166
|
+
Authorization: "Bearer ".concat(token),
|
|
167
|
+
},
|
|
168
|
+
body: formData,
|
|
169
|
+
})];
|
|
170
|
+
case 3:
|
|
171
|
+
response = _a.sent();
|
|
172
|
+
if (!!response.ok) return [3 /*break*/, 5];
|
|
173
|
+
return [4 /*yield*/, response.json()];
|
|
174
|
+
case 4:
|
|
175
|
+
errorData = _a.sent();
|
|
176
|
+
console.error("GalleryPage: Upload failed", { status: response.status, errorData: errorData });
|
|
177
|
+
if (response.status === 401) {
|
|
178
|
+
setError(GALLERY_PAGE.ERRORS.AUTHENTICATION_ERROR);
|
|
179
|
+
return [2 /*return*/];
|
|
180
|
+
}
|
|
181
|
+
throw new Error(errorData.error || GALLERY_PAGE.ERRORS.UPLOAD_IMAGE_FAILED.replace("${response.status}", response.status.toString()));
|
|
182
|
+
case 5: return [4 /*yield*/, response.json()];
|
|
183
|
+
case 6:
|
|
184
|
+
data = (_a.sent()).data;
|
|
185
|
+
setUploadedImages(data || []);
|
|
186
|
+
setError(null);
|
|
187
|
+
return [3 /*break*/, 9];
|
|
188
|
+
case 7:
|
|
189
|
+
err_2 = _a.sent();
|
|
190
|
+
console.error("GalleryPage: Upload Error", err_2);
|
|
191
|
+
setError(err_2 instanceof Error ? err_2.message : GALLERY_PAGE.ERRORS.UPLOAD_IMAGE_ERROR);
|
|
192
|
+
return [3 /*break*/, 9];
|
|
193
|
+
case 8:
|
|
194
|
+
setIsLoading(false);
|
|
195
|
+
return [7 /*endfinally*/];
|
|
196
|
+
case 9: return [2 /*return*/];
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}); };
|
|
200
|
+
var handleDeleteImage = function (documentId) { return __awaiter(_this, void 0, void 0, function () {
|
|
201
|
+
var token, response, errorData, data, err_3;
|
|
202
|
+
return __generator(this, function (_a) {
|
|
203
|
+
switch (_a.label) {
|
|
204
|
+
case 0:
|
|
205
|
+
if (!isAdmin) {
|
|
206
|
+
console.error("GalleryPage: Unauthorized delete attempt", {
|
|
207
|
+
isSignedIn: isSignedIn,
|
|
208
|
+
businessAdminId: user === null || user === void 0 ? void 0 : user.businessAdminId,
|
|
209
|
+
});
|
|
210
|
+
setError(GALLERY_PAGE.ERRORS.UNAUTHORIZED_DELETE);
|
|
211
|
+
return [2 /*return*/];
|
|
212
|
+
}
|
|
213
|
+
_a.label = 1;
|
|
214
|
+
case 1:
|
|
215
|
+
_a.trys.push([1, 7, 8, 9]);
|
|
216
|
+
setIsLoading(true);
|
|
217
|
+
return [4 /*yield*/, getToken()];
|
|
218
|
+
case 2:
|
|
219
|
+
token = _a.sent();
|
|
220
|
+
if (!token) {
|
|
221
|
+
setError(GALLERY_PAGE.ERRORS.AUTHENTICATION_ERROR);
|
|
222
|
+
return [2 /*return*/];
|
|
223
|
+
}
|
|
224
|
+
return [4 /*yield*/, fetch("/api/gallery-data", {
|
|
225
|
+
method: "DELETE",
|
|
226
|
+
headers: {
|
|
227
|
+
"Content-Type": "application/json",
|
|
228
|
+
Authorization: "Bearer ".concat(token),
|
|
229
|
+
},
|
|
230
|
+
body: JSON.stringify({ documentId: documentId }),
|
|
231
|
+
})];
|
|
232
|
+
case 3:
|
|
233
|
+
response = _a.sent();
|
|
234
|
+
if (!!response.ok) return [3 /*break*/, 5];
|
|
235
|
+
return [4 /*yield*/, response.json()];
|
|
236
|
+
case 4:
|
|
237
|
+
errorData = _a.sent();
|
|
238
|
+
console.error("GalleryPage: Delete failed", { status: response.status, errorData: errorData });
|
|
239
|
+
if (response.status === 401) {
|
|
240
|
+
setError(GALLERY_PAGE.ERRORS.AUTHENTICATION_ERROR);
|
|
241
|
+
return [2 /*return*/];
|
|
242
|
+
}
|
|
243
|
+
throw new Error(errorData.error || GALLERY_PAGE.ERRORS.DELETE_IMAGE_FAILED.replace("${response.status}", response.status.toString()));
|
|
244
|
+
case 5: return [4 /*yield*/, response.json()];
|
|
245
|
+
case 6:
|
|
246
|
+
data = (_a.sent()).data;
|
|
247
|
+
setUploadedImages(data || []);
|
|
248
|
+
setError(null);
|
|
249
|
+
return [3 /*break*/, 9];
|
|
250
|
+
case 7:
|
|
251
|
+
err_3 = _a.sent();
|
|
252
|
+
console.error("GalleryPage: Delete Error", err_3);
|
|
253
|
+
setError(err_3 instanceof Error ? err_3.message : GALLERY_PAGE.ERRORS.DELETE_IMAGE_ERROR);
|
|
254
|
+
return [3 /*break*/, 9];
|
|
255
|
+
case 8:
|
|
256
|
+
setIsLoading(false);
|
|
257
|
+
return [7 /*endfinally*/];
|
|
258
|
+
case 9: return [2 /*return*/];
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
}); };
|
|
262
|
+
if (isLoading || authLoading) {
|
|
263
|
+
return <Spinner />;
|
|
264
|
+
}
|
|
265
|
+
return (<div className="min-h-screen w-full bg-[#F7F7F7] relative overflow-hidden flex flex-col">
|
|
266
|
+
{error && <div className="text-red-500 text-center p-4">{error}</div>}
|
|
267
|
+
<style jsx>{"\n @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap\");\n\n :root {\n --jubilee: #F47C7C;\n --natural-white: #F7F7F7;\n --caviar: #2D2D2D;\n --storm-cloud: #4A636E;\n --exuberant-blue: #FF54B4;\n --modern-purple: #D946EF;\n }\n\n * {\n font-family: \"Inter\", system-ui, sans-serif;\n }\n\n .gradient-text {\n background: linear-gradient(135deg, var(--exuberant-blue), var(--jubilee), var(--modern-purple));\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);\n }\n\n @media (max-width: 1024px) {\n .container-padding {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n padding-top: 5rem;\n padding-bottom: 5rem;\n }\n\n .main-heading {\n font-size: 3rem;\n margin-bottom: 3rem;\n }\n\n .content-text {\n font-size: 1.25rem;\n }\n }\n\n @media (max-width: 640px) {\n .container-padding {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 4rem;\n padding-bottom: 4rem;\n }\n\n .main-heading {\n font-size: 2.5rem;\n }\n\n .content-text {\n font-size: 1rem;\n }\n }\n "}</style>
|
|
268
|
+
<div className="w-full px-6 py-20 lg:px-12 lg:py-40 flex-grow relative z-10 container-padding bg-white">
|
|
269
|
+
<motion.h1 initial={{ opacity: 0, y: -50 }} animate={{ opacity: 1, y: 0 }} className="text-4xl sm:text-5xl lg:text-7xl font-black mb-20 lg:mb-20 gradient-text text-center uppercase drop-shadow-lg main-heading pt-36 sm:pt-32">
|
|
270
|
+
{GALLERY_PAGE.UI.MAIN_HEADING}
|
|
271
|
+
</motion.h1>
|
|
272
|
+
<div className="mb-4 text-center">
|
|
273
|
+
{authLoading || isLoading ? (<p className="text-gray-400 text-sm font-medium">{GALLERY_PAGE.UI.LOADING_TEXT}</p>) : isAdmin ? (<p className="text-gray-400 text-sm font-medium">
|
|
274
|
+
{GALLERY_PAGE.UI.ADMIN_LOGGED_IN_MESSAGE}
|
|
275
|
+
</p>) : user ? (<p className="text-gray-400 text-sm font-medium"></p>) : (<p className="text-gray-400 text-sm font-medium"></p>)}
|
|
276
|
+
</div>
|
|
277
|
+
<GallerySection user={galleryUser} setUser={setUser} authLoading={authLoading} uploadedImages={currentUploadedImages} setUploadedImages={setUploadedImages} error={error} setError={setError} isLoading={isLoading} setIsLoading={setIsLoading} handleImageUpload={handleImageUpload} handleDeleteImage={handleDeleteImage}/>
|
|
278
|
+
<ImageDescCarousel user={galleryUser} uploadedImages={filteredImages} setUploadedImages={setUploadedImages} error={error} setError={setError} isLoading={isLoading} setIsLoading={setIsLoading} handleImageUpload={handleImageUpload} handleDeleteImage={handleDeleteImage}/>
|
|
279
|
+
</div>
|
|
280
|
+
</div>);
|
|
281
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import './globals.css';
|
|
2
|
+
import { Inter } from 'next/font/google';
|
|
3
|
+
import { ClerkProvider } from '@clerk/nextjs';
|
|
4
|
+
import { ThemeProvider } from "@/components/theme-provider";
|
|
5
|
+
import { AuthProvider } from "@/lib/auth-context";
|
|
6
|
+
import Navbar from '@/components/navBars/navbar';
|
|
7
|
+
import { Toaster } from "@/components/other/toaster";
|
|
8
|
+
import Footer from '@/components/footers/footer';
|
|
9
|
+
import IconBubble from '@/components/addOns/non-functional/IconBubble';
|
|
10
|
+
var inter = Inter({ subsets: ['latin'], preload: true });
|
|
11
|
+
export var metadata = {
|
|
12
|
+
metadataBase: new URL(process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000'),
|
|
13
|
+
title: "DevVista Kit",
|
|
14
|
+
description: 'Your 24/7 fitness destination',
|
|
15
|
+
openGraph: {
|
|
16
|
+
title: "DevVista Kit",
|
|
17
|
+
description: '',
|
|
18
|
+
url: 'https://devvistatech.com/',
|
|
19
|
+
images: [{ url: '/images/FitStop.png' }],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export default function RootLayout(_a) {
|
|
23
|
+
var children = _a.children;
|
|
24
|
+
return (<ClerkProvider>
|
|
25
|
+
<html lang="en" className="h-full">
|
|
26
|
+
<head>
|
|
27
|
+
<script async src={"https://www.googletagmanager.com/gtag/js?id=".concat(process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID)}></script>
|
|
28
|
+
<script dangerouslySetInnerHTML={{
|
|
29
|
+
__html: "\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '".concat(process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID, "');\n "),
|
|
30
|
+
}}/>
|
|
31
|
+
</head>
|
|
32
|
+
<body className={"".concat(inter.className, " h-full bg-gray-900 text-gray-700 antialiased")}>
|
|
33
|
+
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem={false} disableTransitionOnChange>
|
|
34
|
+
<AuthProvider>
|
|
35
|
+
<Navbar />
|
|
36
|
+
<main className="min-h-screen w-full">{children}</main>
|
|
37
|
+
<Toaster />
|
|
38
|
+
<Footer />
|
|
39
|
+
<IconBubble />
|
|
40
|
+
</AuthProvider>
|
|
41
|
+
</ThemeProvider>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
44
|
+
</ClerkProvider>);
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
export default function NotFound() {
|
|
4
|
+
return (<div className="min-h-screen bg-gray-900 text-gray-200 flex flex-col justify-center items-center px-4 sm:px-6 lg:px-8">
|
|
5
|
+
<div className="max-w-7xl mx-auto text-center">
|
|
6
|
+
<h1 className="text-4xl sm:text-5xl font-extrabold tracking-tight mb-8 text-gray-200">
|
|
7
|
+
404 - Page Not Found
|
|
8
|
+
</h1>
|
|
9
|
+
<Link href="/" className="inline-block bg-blue-500 text-white px-6 py-3 rounded-md hover:bg-blue-600">
|
|
10
|
+
Back to Home
|
|
11
|
+
</Link>
|
|
12
|
+
</div>
|
|
13
|
+
</div>);
|
|
14
|
+
}
|