Updated to remove unused items
This commit is contained in:
parent
5720c51f15
commit
ae2557d524
@ -8,7 +8,6 @@ import { SeverityType } from './components/Snack';
|
||||
import { Query } from './types/types';
|
||||
import { ConversationHandle } from './components/Conversation';
|
||||
import { UserProvider } from './components/UserContext';
|
||||
import { BetaPage } from './pages/BetaPage';
|
||||
import { UserRoute } from './routes/UserRoute';
|
||||
import { BackstoryLayout } from './components/BackstoryLayout';
|
||||
|
||||
@ -48,7 +47,6 @@ const BackstoryApp = () => {
|
||||
navigate('/chat');
|
||||
};
|
||||
const [page, setPage] = useState<string>("");
|
||||
const [storeInCookie, setStoreInCookie] = useState(true);
|
||||
|
||||
// Extract session ID from URL query parameter or cookie
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
@ -107,23 +105,15 @@ const BackstoryApp = () => {
|
||||
setSnack(`${action} session ${newSessionId}`);
|
||||
|
||||
// Store in cookie if user opts in
|
||||
if (storeInCookie) {
|
||||
setCookie('session_id', newSessionId);
|
||||
}
|
||||
// Update URL without reloading
|
||||
if (!storeInCookie) {
|
||||
// Update only the 'id' query parameter, preserving the current path
|
||||
navigate(`${location.pathname}?id=${newSessionId}`, { replace: true });
|
||||
} else {
|
||||
// Clear all query parameters, preserve the current path
|
||||
navigate(location.pathname, { replace: true });
|
||||
}
|
||||
setCookie('session_id', newSessionId);
|
||||
// Clear all query parameters, preserve the current path
|
||||
navigate(location.pathname, { replace: true });
|
||||
} catch (err) {
|
||||
setSnack("" + err);
|
||||
}
|
||||
};
|
||||
fetchSession();
|
||||
}, [cookieSessionId, setSnack, storeInCookie, urlSessionId]);
|
||||
}, [cookieSessionId, setSnack, urlSessionId, location.pathname, navigate]);
|
||||
|
||||
useEffect(() => {
|
||||
const currentRoute = location.pathname.split("/")[1] ? `/${location.pathname.split("/")[1]}` : "/";
|
||||
|
@ -1,38 +1,36 @@
|
||||
import React, { Ref, Fragment, ReactNode } from "react";
|
||||
import React, { Ref, ReactNode } from "react";
|
||||
import { Route } from "react-router-dom";
|
||||
import { useUser } from "./UserContext";
|
||||
import { Box, Typography, Container, Paper } from '@mui/material';
|
||||
import { Typography } from '@mui/material';
|
||||
|
||||
import { BackstoryPageProps } from './BackstoryTab';
|
||||
import { ConversationHandle } from './Conversation';
|
||||
import { User } from '../types/types';
|
||||
import { User } from 'types/types';
|
||||
|
||||
import { ChatPage } from '../pages/ChatPage';
|
||||
import { ResumeBuilderPage } from '../pages/ResumeBuilderPage';
|
||||
import { DocsPage } from '../pages/DocsPage';
|
||||
import { CreateProfilePage } from '../pages/CreateProfilePage';
|
||||
import { VectorVisualizerPage } from '../pages/VectorVisualizerPage';
|
||||
import { HomePage } from '../pages/HomePage';
|
||||
import { BetaPage } from '../pages/BetaPage';
|
||||
import { CandidateListingPage } from '../pages/CandidateListingPage';
|
||||
import { JobAnalysisPage } from '../pages/JobAnalysisPage';
|
||||
import { DemoComponent } from "pages/DemoComponent";
|
||||
import { ChatPage } from 'pages/ChatPage';
|
||||
import { ResumeBuilderPage } from 'pages/ResumeBuilderPage';
|
||||
import { DocsPage } from 'pages/DocsPage';
|
||||
import { CreateProfilePage } from 'pages/CreateProfilePage';
|
||||
import { VectorVisualizerPage } from 'pages/VectorVisualizerPage';
|
||||
import { HomePage } from 'pages/HomePage';
|
||||
import { BetaPage } from 'pages/BetaPage';
|
||||
import { CandidateListingPage } from 'pages/CandidateListingPage';
|
||||
import { JobAnalysisPage } from 'pages/JobAnalysisPage';
|
||||
import { GenerateCandidate } from "pages/GenerateCandidate";
|
||||
import { ControlsPage } from '../pages/ControlsPage';
|
||||
import { ControlsPage } from 'pages/ControlsPage';
|
||||
|
||||
const DashboardPage = () => (<BetaPage><Typography variant="h4">Dashboard</Typography></BetaPage>);
|
||||
const ProfilePage = () => (<BetaPage><Typography variant="h4">Profile</Typography></BetaPage>);
|
||||
const BackstoryPage = () => (<BetaPage><Typography variant="h4">Backstory</Typography></BetaPage>);
|
||||
const ResumesPage = () => (<BetaPage><Typography variant="h4">Resumes</Typography></BetaPage>);
|
||||
const QASetupPage = () => (<BetaPage><Typography variant="h4">Q&A Setup</Typography></BetaPage>);
|
||||
const AnalyticsPage = () => (<BetaPage><Typography variant="h4">Analytics</Typography></BetaPage>);
|
||||
const SettingsPage = () => (<BetaPage><Typography variant="h4">Settings</Typography></BetaPage>);
|
||||
const SearchPage = () => (<BetaPage><Typography variant="h4">Search</Typography></BetaPage>);
|
||||
const SavedPage = () => (<BetaPage><Typography variant="h4">Saved</Typography></BetaPage>);
|
||||
const JobsPage = () => (<BetaPage><Typography variant="h4">Jobs</Typography></BetaPage>);
|
||||
const CompanyPage = () => (<BetaPage><Typography variant="h4">Company</Typography></BetaPage>);
|
||||
const LogoutPage = () => (<BetaPage><Typography variant="h4">Logout page...</Typography></BetaPage>);
|
||||
const LoginPage = () => (<BetaPage><Typography variant="h4">Login page...</Typography></BetaPage>);
|
||||
// const DashboardPage = () => (<BetaPage><Typography variant="h4">Dashboard</Typography></BetaPage>);
|
||||
// const AnalyticsPage = () => (<BetaPage><Typography variant="h4">Analytics</Typography></BetaPage>);
|
||||
// const SettingsPage = () => (<BetaPage><Typography variant="h4">Settings</Typography></BetaPage>);
|
||||
|
||||
interface BackstoryDynamicRoutesProps extends BackstoryPageProps {
|
||||
chatRef: Ref<ConversationHandle>
|
||||
|
@ -1,14 +1,12 @@
|
||||
import React from 'react';
|
||||
import { Box, Link, Typography, Avatar, Grid, Chip, SxProps, CardHeader } from '@mui/material';
|
||||
import { Box, Link, Typography, Avatar, Grid, SxProps } from '@mui/material';
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardActionArea,
|
||||
Divider,
|
||||
useTheme,
|
||||
} from '@mui/material';
|
||||
import { useMediaQuery } from '@mui/material';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useUser } from "./UserContext";
|
||||
import { Candidate } from '../types/types';
|
||||
import { CopyBubble } from "./CopyBubble";
|
||||
@ -27,16 +25,9 @@ const CandidateInfo: React.FC<CandidateInfoProps> = (props: CandidateInfoProps)
|
||||
action = '',
|
||||
sessionId,
|
||||
} = props;
|
||||
const navigate = useNavigate();
|
||||
const theme = useTheme();
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
||||
|
||||
// Format RAG content size (e.g., if it's in bytes, convert to KB/MB)
|
||||
const formatRagSize = (size: number): string => {
|
||||
if (size < 1000) return `${size} RAG elements`;
|
||||
if (size < 1000000) return `${(size / 1000).toFixed(1)}K RAG elements`;
|
||||
return `${(size / 1000000).toFixed(1)}M RAG elements`;
|
||||
};
|
||||
const candidate: Candidate | null = props.user || (user as Candidate);
|
||||
|
||||
if (!candidate) {
|
||||
@ -110,16 +101,7 @@ const CandidateInfo: React.FC<CandidateInfoProps> = (props: CandidateInfoProps)
|
||||
onClick={(event: any) => { event.stopPropagation() }}
|
||||
tooltip="Copy link" content={`${window.location.origin}/u/{candidate.username}`} />
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* {candidate.rag_content_size !== undefined && candidate.rag_content_size > 0 &&
|
||||
<Chip
|
||||
onClick={(event: React.MouseEvent<HTMLDivElement>) => { navigate('/knowledge-explorer'); event.stopPropagation() }}
|
||||
label={formatRagSize(candidate.rag_content_size)}
|
||||
color="primary"
|
||||
size="small"
|
||||
sx={{ ml: 2 }}
|
||||
/>} */}
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Typography variant="body1" color="text.secondary">
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { useState, useImperativeHandle, forwardRef, useEffect, useRef, useCallback } from 'react';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import Button from '@mui/material/Button';
|
||||
@ -51,9 +50,7 @@ const Conversation = forwardRef<ConversationHandle, ConversationProps>((props: C
|
||||
const {
|
||||
sessionId,
|
||||
actionLabel,
|
||||
className,
|
||||
defaultPrompts,
|
||||
defaultQuery,
|
||||
hideDefaultPrompts,
|
||||
hidePreamble,
|
||||
messageFilter,
|
||||
@ -69,7 +66,6 @@ const Conversation = forwardRef<ConversationHandle, ConversationProps>((props: C
|
||||
type,
|
||||
} = props;
|
||||
const { user } = useUser()
|
||||
const [contextUsedPercentage, setContextUsedPercentage] = useState<number>(0);
|
||||
const [processing, setProcessing] = useState<boolean>(false);
|
||||
const [countdown, setCountdown] = useState<number>(0);
|
||||
const [conversation, setConversation] = useState<MessageList>([]);
|
||||
@ -77,7 +73,6 @@ const Conversation = forwardRef<ConversationHandle, ConversationProps>((props: C
|
||||
const [processingMessage, setProcessingMessage] = useState<BackstoryMessage | undefined>(undefined);
|
||||
const [streamingMessage, setStreamingMessage] = useState<BackstoryMessage | undefined>(undefined);
|
||||
const timerRef = useRef<any>(null);
|
||||
const [contextWarningShown, setContextWarningShown] = useState<boolean>(false);
|
||||
const [noInteractions, setNoInteractions] = useState<boolean>(true);
|
||||
const conversationRef = useRef<MessageList>([]);
|
||||
const viewableElementRef = useRef<HTMLDivElement>(null);
|
||||
|
@ -1,25 +1,10 @@
|
||||
import React, { useEffect, useState, useRef, useCallback } from 'react';
|
||||
import Avatar from '@mui/material/Avatar';
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import Box from '@mui/material/Box';
|
||||
import Tooltip from '@mui/material/Tooltip';
|
||||
import Button from '@mui/material/Button';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import SendIcon from '@mui/icons-material/Send';
|
||||
import PropagateLoader from 'react-spinners/PropagateLoader';
|
||||
import { CandidateInfo } from './CandidateInfo';
|
||||
import { Query } from '../types/types'
|
||||
import { Quote } from 'components/Quote';
|
||||
import { streamQueryResponse, StreamQueryController } from './streamQueryResponse';
|
||||
import { connectionBase } from 'Global';
|
||||
import { User } from '../types/types';
|
||||
import { BackstoryElementProps } from 'components/BackstoryTab';
|
||||
import { BackstoryTextField, BackstoryTextFieldRef } from 'components/BackstoryTextField';
|
||||
import { jsonrepair } from 'jsonrepair';
|
||||
import { StyledMarkdown } from 'components/StyledMarkdown';
|
||||
import { Scrollable } from './Scrollable';
|
||||
import { Pulse } from 'components/Pulse';
|
||||
import { useUser } from './UserContext';
|
||||
|
||||
interface GenerateImageProps extends BackstoryElementProps {
|
||||
@ -31,7 +16,6 @@ const GenerateImage = (props: GenerateImageProps) => {
|
||||
const {sessionId, setSnack, prompt} = props;
|
||||
const [processing, setProcessing] = useState<boolean>(false);
|
||||
const [status, setStatus] = useState<string>('');
|
||||
const [timestamp, setTimestamp] = useState<number>(0);
|
||||
const [image, setImage] = useState<string>('');
|
||||
|
||||
// Only keep refs that are truly necessary
|
||||
@ -90,11 +74,6 @@ const GenerateImage = (props: GenerateImageProps) => {
|
||||
if (msg.status !== "heartbeat") {
|
||||
console.log(data);
|
||||
}
|
||||
if (data.timestamp) {
|
||||
setTimestamp(data.timestamp);
|
||||
} else {
|
||||
setTimestamp(Date.now())
|
||||
}
|
||||
if (data.message) {
|
||||
setStatus(data.message);
|
||||
}
|
||||
|
@ -29,13 +29,12 @@ import {
|
||||
Settings,
|
||||
ExpandMore,
|
||||
} from '@mui/icons-material';
|
||||
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
||||
|
||||
import { NavigationLinkType } from './BackstoryLayout';
|
||||
import { Beta } from './Beta';
|
||||
import './Header.css';
|
||||
import { useUser } from './UserContext';
|
||||
import { Candidate, Employer } from '../types/types';
|
||||
// import { Candidate, Employer } from '../types/types';
|
||||
import { SetSnackType } from './Snack';
|
||||
import { CopyBubble } from './CopyBubble';
|
||||
|
||||
@ -97,15 +96,14 @@ interface HeaderProps {
|
||||
|
||||
const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
|
||||
const { user } = useUser();
|
||||
const candidate: Candidate | null = (user && user.userType === "UserType.CANDIDATE") ? user as Candidate : null;
|
||||
const employer: Employer | null = (user && user.userType === "UserType.EMPLOYER") ? user as Employer : null;
|
||||
// const candidate: Candidate | null = (user && user.userType === "UserType.CANDIDATE") ? user as Candidate : null;
|
||||
// const employer: Employer | null = (user && user.userType === "UserType.EMPLOYER") ? user as Employer : null;
|
||||
const {
|
||||
transparent = false,
|
||||
className,
|
||||
navigate,
|
||||
navigationLinks,
|
||||
showLogin,
|
||||
currentPath,
|
||||
sessionId,
|
||||
onLogout,
|
||||
setSnack,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { MuiMarkdown } from 'mui-markdown';
|
||||
import { SxProps, useTheme } from '@mui/material/styles';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { Link } from '@mui/material';
|
||||
import { ChatQuery } from './ChatQuery';
|
||||
import Box from '@mui/material/Box';
|
||||
|
@ -1,15 +1,8 @@
|
||||
import React, { createContext, useContext, useEffect, useState } from "react";
|
||||
import { Tunables } from '../types/types';
|
||||
import { SetSnackType } from './Snack';
|
||||
import { connectionBase } from '../Global';
|
||||
import { User } from '../types/types';
|
||||
|
||||
// Define the UserInfo interface for type safety
|
||||
interface UserQuestion {
|
||||
question: string;
|
||||
tunables?: Tunables;
|
||||
};
|
||||
|
||||
type UserContextType = {
|
||||
user: User | null;
|
||||
setUser: (user: User | null) => void;
|
||||
@ -60,7 +53,7 @@ const UserProvider: React.FC<UserProviderProps> = (props: UserProviderProps) =>
|
||||
};
|
||||
|
||||
fetchUserFromSession();
|
||||
}, [sessionId, user, setUser]);
|
||||
}, [sessionId, user, setUser, setSnack]);
|
||||
|
||||
if (sessionId === undefined) {
|
||||
return <></>;
|
||||
|
@ -20,8 +20,7 @@ import { Scrollable } from './Scrollable';
|
||||
import { connectionBase } from '../Global';
|
||||
|
||||
import './VectorVisualizer.css';
|
||||
import { BackstoryPageProps } from '../NewApp/Components/BackstoryTab';
|
||||
import { relative } from 'path';
|
||||
import { BackstoryPageProps } from './BackstoryTab';
|
||||
|
||||
interface VectorVisualizerProps extends BackstoryPageProps {
|
||||
inline?: boolean;
|
||||
|
@ -1,8 +1,4 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
||||
import CssBaseline from '@mui/material/CssBaseline';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
import { Box, Typography, Paper, Container } from '@mui/material';
|
||||
|
||||
// Import the backstoryTheme
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { backstoryTheme } from '../../BackstoryTheme';
|
||||
import { Box, Typography, Paper, Container } from '@mui/material';
|
||||
import { backstoryTheme } from '../BackstoryTheme';
|
||||
import { Box, Paper, Container } from '@mui/material';
|
||||
|
||||
// This component provides a visual demonstration of the theme colors
|
||||
const BackstoryThemeVisualizerPage = () => {
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
||||
import { Box, Container, Paper, Typography, Grid, Divider, CssBaseline } from '@mui/material';
|
||||
import { ThemeProvider } from '@mui/material/styles';
|
||||
import { Box, Container, Paper, Typography, Grid, CssBaseline } from '@mui/material';
|
||||
import { backstoryTheme } from 'BackstoryTheme';
|
||||
|
||||
const BackstoryUIOverviewPage: React.FC = () => {
|
@ -1,7 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
AppBar, Avatar, Box, Button, Chip, Container, Divider, Drawer,
|
||||
IconButton, InputBase, List, ListItem, ListItemButton, ListItemIcon,
|
||||
AppBar, Box, Button, Chip, Drawer,
|
||||
IconButton, List, ListItem, ListItemButton, ListItemIcon,
|
||||
ListItemText, Paper, Tab, Tabs, TextField, Typography,
|
||||
useMediaQuery, useTheme
|
||||
} from '@mui/material';
|
||||
@ -9,7 +9,7 @@ import {
|
||||
Menu as MenuIcon, Search as SearchIcon, Description as FileTextIcon,
|
||||
Person as UserIcon, Settings as SettingsIcon, Add as PlusIcon,
|
||||
Edit as EditIcon, Visibility as EyeIcon, Save as SaveIcon,
|
||||
Delete as TrashIcon, AccessTime as ClockIcon, ChevronRight as ChevronRightIcon
|
||||
Delete as TrashIcon, AccessTime as ClockIcon
|
||||
} from '@mui/icons-material';
|
||||
|
||||
interface Resume {
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Box,
|
||||
Typography,
|
||||
@ -11,7 +11,6 @@ import {
|
||||
TableContainer,
|
||||
TableHead,
|
||||
TableRow,
|
||||
Avatar,
|
||||
Chip,
|
||||
Button,
|
||||
Dialog,
|
@ -4,7 +4,7 @@ import { ThemeProvider } from '@mui/material/styles';
|
||||
import { backstoryTheme } from './BackstoryTheme';
|
||||
import { BrowserRouter as Router } from "react-router-dom";
|
||||
import { BackstoryApp } from './BackstoryApp';
|
||||
import { BackstoryTestApp } from 'TestApp';
|
||||
// import { BackstoryTestApp } from 'TestApp';
|
||||
|
||||
import './index.css';
|
||||
|
||||
@ -16,8 +16,8 @@ root.render(
|
||||
<React.StrictMode>
|
||||
<ThemeProvider theme={backstoryTheme}>
|
||||
<Router>
|
||||
{/* <BackstoryApp /> */}
|
||||
<BackstoryTestApp />
|
||||
<BackstoryApp />
|
||||
{/* <BackstoryTestApp /> */}
|
||||
</Router>
|
||||
</ThemeProvider>
|
||||
</React.StrictMode>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Route, Routes, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Box,
|
||||
Container,
|
||||
@ -7,7 +7,6 @@ import {
|
||||
Paper,
|
||||
Grid,
|
||||
Button,
|
||||
useMediaQuery,
|
||||
alpha,
|
||||
GlobalStyles
|
||||
} from '@mui/material';
|
||||
@ -34,7 +33,6 @@ const BetaPage: React.FC<BetaPageProps> = ({
|
||||
onReturn,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
||||
const [showSparkle, setShowSparkle] = useState<boolean>(false);
|
||||
const navigate = useNavigate();
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { forwardRef, useEffect, useState } from 'react';
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import useMediaQuery from '@mui/material/useMediaQuery';
|
||||
import Box from '@mui/material/Box';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
@ -8,21 +7,16 @@ import MuiMarkdown from 'mui-markdown';
|
||||
import { BackstoryPageProps } from '../components/BackstoryTab';
|
||||
import { Conversation, ConversationHandle } from '../components/Conversation';
|
||||
import { ChatQuery } from '../components/ChatQuery';
|
||||
import { MessageList } from '../components/Message';
|
||||
import { CandidateInfo } from 'components/CandidateInfo';
|
||||
import { connectionBase } from '../Global';
|
||||
import { LoadingComponent } from 'components/LoadingComponent';
|
||||
import { useUser } from "../components/UserContext";
|
||||
import { Candidate, Tunables } from "../types/types";
|
||||
import { Navigate } from 'react-router-dom';
|
||||
import { Candidate } from "../types/types";
|
||||
|
||||
const ChatPage = forwardRef<ConversationHandle, BackstoryPageProps>((props: BackstoryPageProps, ref) => {
|
||||
const navigate = useNavigate();
|
||||
const { sessionId, setSnack, submitQuery } = props;
|
||||
const theme = useTheme();
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
||||
const [questions, setQuestions] = useState<React.ReactElement[]>([]);
|
||||
const { user } = useUser();
|
||||
const { sessionId, setSnack, submitQuery } = props;
|
||||
const theme = useTheme();
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
||||
const [questions, setQuestions] = useState<React.ReactElement[]>([]);
|
||||
const { user } = useUser();
|
||||
const candidate: Candidate | null = (user && user.userType === "UserType.CANDIDATE") ? user as Candidate : null;
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Route, Routes, useLocation, useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@ -21,7 +20,7 @@ import {
|
||||
import { styled } from '@mui/material/styles';
|
||||
import { CloudUpload, PhotoCamera } from '@mui/icons-material';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { Beta } from '../components/Beta';
|
||||
// import { Beta } from '../components/Beta';
|
||||
|
||||
// Interfaces
|
||||
interface ProfileFormData {
|
||||
@ -49,7 +48,6 @@ const VisuallyHiddenInput = styled('input')({
|
||||
|
||||
const CreateProfilePage: React.FC = () => {
|
||||
const theme = useTheme();
|
||||
const navigate = useNavigate();
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
|
||||
|
||||
// State management
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useNavigate, useLocation, useParams, Navigate } from 'react-router-dom';
|
||||
import { useNavigate, useLocation, useParams } from 'react-router-dom';
|
||||
import {
|
||||
Box,
|
||||
Drawer,
|
||||
@ -34,11 +34,11 @@ import ViewQuiltIcon from '@mui/icons-material/ViewQuilt';
|
||||
|
||||
import { Document } from '../components/Document';
|
||||
import { BackstoryPageProps } from '../components/BackstoryTab';
|
||||
import { BackstoryUIOverviewPage } from './documents/BackstoryUIOverviewPage';
|
||||
import { BackstoryAppAnalysisPage } from './documents/BackstoryAppAnalysisPage';
|
||||
import { BackstoryThemeVisualizerPage } from './documents/BackstoryThemeVisualizerPage';
|
||||
import { UserManagement } from './documents/UserManagement';
|
||||
import { MockupPage } from './documents/MockupPage';
|
||||
import { BackstoryUIOverviewPage } from 'documents/BackstoryUIOverviewPage';
|
||||
import { BackstoryAppAnalysisPage } from 'documents/BackstoryAppAnalysisPage';
|
||||
import { BackstoryThemeVisualizerPage } from 'documents/BackstoryThemeVisualizerPage';
|
||||
import { UserManagement } from 'documents/UserManagement';
|
||||
import { MockupPage } from 'documents/MockupPage';
|
||||
|
||||
// Sidebar navigation component using MUI components
|
||||
const Sidebar: React.FC<{
|
||||
@ -282,7 +282,7 @@ const DocsPage = (props: BackstoryPageProps) => {
|
||||
|
||||
<Grid container spacing={2}>
|
||||
{documents.map((doc, index) => {
|
||||
if (doc.route === null) return;
|
||||
if (doc.route === null) return (<></>);
|
||||
return (<Grid size={{ xs: 12, sm: 6, md: 4 }} key={index}>
|
||||
<Card>
|
||||
<CardActionArea onClick={() => doc.route ? onDocumentExpand(doc.route, true) : navigate('/')}>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Navigate, Route, Routes, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@ -133,8 +133,6 @@ const FeatureCard = ({
|
||||
};
|
||||
|
||||
const HomePage = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (<Box sx={{display: "flex", flexDirection: "column"}}>
|
||||
{/* Hero Section */}
|
||||
<HeroSection>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { Navigate, useParams, useNavigate, useLocation } from "react-router-dom";
|
||||
import { useParams, useNavigate } from "react-router-dom";
|
||||
import { useUser } from "../components/UserContext";
|
||||
import { User } from "../types/types";
|
||||
import { Box } from "@mui/material";
|
||||
@ -17,7 +17,6 @@ const UserRoute: React.FC<UserRouteProps> = (props: UserRouteProps) => {
|
||||
const { username } = useParams<{ username: string }>();
|
||||
const { user, setUser } = useUser();
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
if (!sessionId) {
|
||||
|
@ -362,7 +362,7 @@ export function debugConversion<T>(obj: T, label: string = 'Object'): T {
|
||||
return obj;
|
||||
}
|
||||
|
||||
export default {
|
||||
const exports = {
|
||||
toSnakeCase,
|
||||
toCamelCase,
|
||||
formatApiRequest,
|
||||
@ -376,4 +376,6 @@ export default {
|
||||
handleApiResponse,
|
||||
handlePaginatedApiResponse,
|
||||
debugConversion
|
||||
};
|
||||
}
|
||||
|
||||
export default exports;
|
Loading…
x
Reference in New Issue
Block a user