From 6f3e43203b29fb79c67db095ee9441ced90969fb Mon Sep 17 00:00:00 2001 From: Prince Kumar Prasad Date: Sat, 21 Sep 2024 10:20:52 +0530 Subject: [PATCH] fixed deployment issues --- dashboard/src/components/general/theme-switcher.tsx | 2 -- dashboard/src/features/help/faq.tsx | 8 ++++---- dashboard/vite.config.ts | 11 ++++++++++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dashboard/src/components/general/theme-switcher.tsx b/dashboard/src/components/general/theme-switcher.tsx index fb6912d..0132777 100644 --- a/dashboard/src/components/general/theme-switcher.tsx +++ b/dashboard/src/components/general/theme-switcher.tsx @@ -1,5 +1,3 @@ -'use client'; - import { useState, useEffect } from 'react'; import { MoonStar, Sun } from 'lucide-react'; import { useTheme } from 'next-themes'; diff --git a/dashboard/src/features/help/faq.tsx b/dashboard/src/features/help/faq.tsx index f5f82a3..59cd78a 100644 --- a/dashboard/src/features/help/faq.tsx +++ b/dashboard/src/features/help/faq.tsx @@ -2,12 +2,12 @@ import React, { useState } from 'react'; import Typography from '../../components/general/typography'; import { FaAngleDown, FaAngleUp } from 'react-icons/fa'; -interface FAQItem { +interface FaqItem { question: string; answer: string; } -const faqData: FAQItem[] = [ +const faqData: FaqItem[] = [ { question: 'How do I reset my password?', answer: @@ -25,7 +25,7 @@ const faqData: FAQItem[] = [ }, ]; -const FAQ: React.FC = () => { +const Faq: React.FC = () => { const [activeIndex, setActiveIndex] = useState(null); const toggleFAQ = (index: number) => { @@ -65,4 +65,4 @@ const FAQ: React.FC = () => { ); }; -export default FAQ; +export default Faq; diff --git a/dashboard/vite.config.ts b/dashboard/vite.config.ts index 4aa6fcc..b2011a2 100644 --- a/dashboard/vite.config.ts +++ b/dashboard/vite.config.ts @@ -6,5 +6,14 @@ export default defineConfig({ plugins: [react()], build: { sourcemap: true, // Enable source maps for production builds + chunkSizeWarningLimit: 1024, // Increase chunk size warning limit to 1kb + rollupOptions: { + output: { + manualChunks: { + // Split dependencies into a separate chunk + react: ['react', 'react-dom'], + }, + }, + }, }, -}); \ No newline at end of file +});