ALwrity + Wix + Wordpress + GSC + Bug Fixes

This commit is contained in:
ajaysi
2025-10-10 13:08:09 +05:30
parent af4c8afb5b
commit 11f164ae21
80 changed files with 125 additions and 678 deletions

View File

@@ -1,5 +1,5 @@
import React, { Component, ErrorInfo, ReactNode } from 'react';
import { Box, Typography, Button, Alert, Stack } from '@mui/material';
import { Typography, Button, Alert, Stack } from '@mui/material';
import { Refresh as RefreshIcon } from '@mui/icons-material';
interface ComponentErrorBoundaryProps {

View File

@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Box, Typography, Chip, Button, CircularProgress, Tooltip } from '@mui/material';
import { PlayArrow, Pause, Stop } from '@mui/icons-material';
import { Box, Typography, Chip, Button, Tooltip } from '@mui/material';
import { PlayArrow } from '@mui/icons-material';
import { ShimmerHeader } from './styled';
import UserBadge from './UserBadge';
import { DashboardHeaderProps } from './types';

View File

@@ -8,7 +8,6 @@ import {
Stack,
Alert,
Collapse,
IconButton,
Divider
} from '@mui/material';
import {

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Box, Container, Alert, Button } from '@mui/material';
import { Container, Alert, Button } from '@mui/material';
import { DashboardContainer } from './styled';
import { ErrorDisplayProps } from './types';

View File

@@ -9,8 +9,7 @@ import { useCopilotReadable } from '@copilotkit/react-core';
import {
WritingPersona,
PlatformAdaptation,
PlatformType,
UserPersonasResponse
PlatformType
} from '../../../types/PlatformPersonaTypes';
import {
getUserPersonas,
@@ -37,6 +36,9 @@ interface PlatformPersonaProviderProps {
userId?: number; // Default to 1 for now, can be enhanced with auth context later
}
// Cache duration: 5 minutes (constant outside component to avoid dependency issues)
const CACHE_DURATION = 5 * 60 * 1000;
// Provider component
export const PlatformPersonaProvider: React.FC<PlatformPersonaProviderProps> = ({
children,
@@ -53,9 +55,6 @@ export const PlatformPersonaProvider: React.FC<PlatformPersonaProviderProps> = (
const lastRequestTime = useRef<number>(0);
const requestInProgress = useRef<boolean>(false);
const dataCacheTime = useRef<number>(0);
// Cache duration: 5 minutes
const CACHE_DURATION = 5 * 60 * 1000;
// Fetch persona data function
const fetchPersonas = useCallback(async () => {
@@ -253,7 +252,7 @@ export const PlatformPersonaProvider: React.FC<PlatformPersonaProviderProps> = (
dataCacheTime.current = Date.now();
requestInProgress.current = false;
}
}, [userId, platform, corePersona]);
}, [userId, platform, corePersona, platformPersona]);
// Initial data fetch
useEffect(() => {

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { Avatar, Box, Button, Menu, MenuItem, Typography, Tooltip } from '@mui/material';
import { Avatar, Box, Menu, MenuItem, Typography, Tooltip } from '@mui/material';
import { useUser, useClerk } from '@clerk/clerk-react';
interface UserBadgeProps {

View File

@@ -1,13 +1,11 @@
import React from 'react';
import {
LineChart,
Line,
BarChart,
Bar,
PieChart,
Pie,
Cell,
AreaChart,
Area,
XAxis,
YAxis,