diff --git a/servers/nextjs/app/(presentation-generator)/upload/components/UploadPage.cy.tsx b/servers/nextjs/app/(presentation-generator)/upload/components/UploadPage.cy.tsx index c7487269..d9a781bc 100644 --- a/servers/nextjs/app/(presentation-generator)/upload/components/UploadPage.cy.tsx +++ b/servers/nextjs/app/(presentation-generator)/upload/components/UploadPage.cy.tsx @@ -4,7 +4,6 @@ import { mount } from 'cypress/react' import { store } from '@/store/store' import { Provider } from 'react-redux' import { AppRouterContext } from 'next/dist/shared/lib/app-router-context.shared-runtime' -import { Toaster } from '@/components/ui/toaster' // Import global styles import '@/app/globals.css' @@ -34,7 +33,6 @@ Cypress.Commands.add('mount', (component, options = {}) => { {children} - ) diff --git a/servers/nextjs/app/api/get-theme-from-name/route.ts b/servers/nextjs/app/api/get-theme-from-name/route.ts deleted file mode 100644 index 438fa5e9..00000000 --- a/servers/nextjs/app/api/get-theme-from-name/route.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NextRequest, NextResponse } from "next/server"; -import { defaultColors } from "@/app/(presentation-generator)/store/themeSlice"; - - -export const GET = async (request: NextRequest) => { - const { searchParams } = new URL(request.url); - const themeName = searchParams.get("theme") ?? "light"; - - const theme = { - name: themeName, - colors: defaultColors[themeName as keyof typeof defaultColors], - } - - return NextResponse.json(theme); -}; \ No newline at end of file diff --git a/servers/nextjs/app/api/theme/route.ts b/servers/nextjs/app/api/theme/route.ts deleted file mode 100644 index 30696cfa..00000000 --- a/servers/nextjs/app/api/theme/route.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { settingsStore } from "@/app/(presentation-generator)/services/setting-store"; -import { NextRequest, NextResponse } from "next/server"; - -const THEME_KEY = 'theme'; - -export async function GET(request: NextRequest) { - try { - const theme = settingsStore.get(THEME_KEY); - - if (!theme) { - return NextResponse.json({ theme: null }); - } - - return NextResponse.json({ theme }); - } catch (error) { - console.error('Error retrieving theme:', error); - return NextResponse.json( - { error: 'Failed to retrieve theme' }, - { status: 500 } - ); - } -} - -export async function POST(request: NextRequest) { - try { - const body = await request.json(); - const { themeData } = body; - - if (!themeData || !themeData.name || !themeData.colors) { - return NextResponse.json( - { error: 'Invalid theme data' }, - { status: 400 } - ); - } - - settingsStore.set(THEME_KEY, themeData); - - return NextResponse.json({ - success: true, - theme: themeData - }); - } catch (error) { - console.error('Error saving theme:', error); - return NextResponse.json( - { error: 'Failed to save theme' }, - { status: 500 } - ); - } -} \ No newline at end of file diff --git a/servers/nextjs/presentation-layouts/analytics/TextIconListSlideLayout.tsx b/servers/nextjs/presentation-layouts/analytics/TextIconListSlideLayout.tsx index 5a553187..2ea4d2bf 100644 --- a/servers/nextjs/presentation-layouts/analytics/TextIconListSlideLayout.tsx +++ b/servers/nextjs/presentation-layouts/analytics/TextIconListSlideLayout.tsx @@ -111,10 +111,8 @@ const TextIconListSlideLayout: React.FC = ({ data: const renderSVGIcon = (iconText: string) => { // If it's an emoji, return as is - if (/[\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/u.test(iconText)) { - return {iconText}; - } - + + // For non-emoji, create a simple circle with text return (
@@ -126,11 +124,11 @@ const TextIconListSlideLayout: React.FC = ({ data: return ( <> {/* Import Google Fonts */} - - +
= ({ data: > {/* Glass overlay background */}
- +
{/* Header section */}
-

= ({ data:
{items.map((item, index) => ( -
@@ -168,11 +166,11 @@ const TextIconListSlideLayout: React.FC = ({ data:
{renderSVGIcon(item.icon)}
- + {/* Content */}
{/* Heading */} -

= ({ data: > {item.heading}

- + {/* Description */} -

= ({ data: {/* Bottom Description section */}

-

= ({ data: slideData }) => { - // Generate initials from presenter name - const getInitials = (name: string) => { - return name.split(' ').map(word => word.charAt(0).toUpperCase()).join(''); - }; - const presenterInitials = getInitials(slideData?.presenterName || 'John Doe'); + return ( <> {/* Import Google Fonts */} - - -

= ({ data: slide {slideData?.description || 'Our product offers customizable dashboards for real-time reporting and data-driven decisions. It integrates with third-party tools to enhance operations and scales with business growth for improved efficiency.'}

- +