Prettier and eslint fixes in progress
This commit is contained in:
parent
0fba24b173
commit
c1e6ab9360
@ -171,7 +171,9 @@ const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
|
|||||||
id: 'divider',
|
id: 'divider',
|
||||||
label: '',
|
label: '',
|
||||||
icon: null,
|
icon: null,
|
||||||
action: () => {},
|
action: () => {
|
||||||
|
console.log('Divider clicked');
|
||||||
|
},
|
||||||
group: 'divider',
|
group: 'divider',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -197,7 +199,9 @@ const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
|
|||||||
id: 'divider',
|
id: 'divider',
|
||||||
label: '',
|
label: '',
|
||||||
icon: null,
|
icon: null,
|
||||||
action: () => {},
|
action: () => {
|
||||||
|
console.log('Divider clicked');
|
||||||
|
},
|
||||||
group: 'divider',
|
group: 'divider',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -223,7 +227,9 @@ const Header: React.FC<HeaderProps> = (props: HeaderProps) => {
|
|||||||
id: 'divider',
|
id: 'divider',
|
||||||
label: '',
|
label: '',
|
||||||
icon: null,
|
icon: null,
|
||||||
action: () => {},
|
action: () => {
|
||||||
|
console.log('Divider clicked');
|
||||||
|
},
|
||||||
group: 'divider',
|
group: 'divider',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
|
|
||||||
import { BackstoryElementProps } from 'components/BackstoryTab';
|
import { BackstoryElementProps } from 'components/BackstoryTab';
|
||||||
@ -15,7 +14,7 @@ interface CandidatePickerProps extends BackstoryElementProps {
|
|||||||
|
|
||||||
const CandidatePicker = (props: CandidatePickerProps) => {
|
const CandidatePicker = (props: CandidatePickerProps) => {
|
||||||
const { onSelect, sx } = props;
|
const { onSelect, sx } = props;
|
||||||
const { apiClient, user } = useAuth();
|
const { apiClient } = useAuth();
|
||||||
const { selectedCandidate, setSelectedCandidate } = useSelectedCandidate();
|
const { selectedCandidate, setSelectedCandidate } = useSelectedCandidate();
|
||||||
const { setSnack } = useAppState();
|
const { setSnack } = useAppState();
|
||||||
const [candidates, setCandidates] = useState<Candidate[] | null>(null);
|
const [candidates, setCandidates] = useState<Candidate[] | null>(null);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import { useTheme } from '@mui/material/styles';
|
|
||||||
|
|
||||||
import './ComingSoon.css';
|
import './ComingSoon.css';
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ const BetaPage: React.FC<BetaPageProps> = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Typography>
|
<Typography>
|
||||||
We're working hard to bring you this exciting new feature!
|
We're working hard to bring you this exciting new feature!
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography color="textSecondary" sx={{ mt: 1 }}>
|
<Typography color="textSecondary" sx={{ mt: 1 }}>
|
||||||
Check back soon for updates.
|
Check back soon for updates.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { forwardRef, useState, useEffect, useRef } from 'react';
|
import React, { forwardRef, useState, useEffect, useRef } from 'react';
|
||||||
import { Box, Paper, Button, useTheme, Tooltip } from '@mui/material';
|
import { Box, Paper, Button, Tooltip } from '@mui/material';
|
||||||
import { Send as SendIcon } from '@mui/icons-material';
|
import { Send as SendIcon } from '@mui/icons-material';
|
||||||
import { useAuth } from 'hooks/AuthContext';
|
import { useAuth } from 'hooks/AuthContext';
|
||||||
import {
|
import {
|
||||||
@ -15,7 +15,6 @@ import { BackstoryPageProps } from 'components/BackstoryTab';
|
|||||||
import { Message } from 'components/Message';
|
import { Message } from 'components/Message';
|
||||||
import { DeleteConfirmation } from 'components/DeleteConfirmation';
|
import { DeleteConfirmation } from 'components/DeleteConfirmation';
|
||||||
import { CandidateInfo } from 'components/ui/CandidateInfo';
|
import { CandidateInfo } from 'components/ui/CandidateInfo';
|
||||||
import { useNavigate } from 'react-router-dom';
|
|
||||||
import { useAppState, useSelectedCandidate } from 'hooks/GlobalContext';
|
import { useAppState, useSelectedCandidate } from 'hooks/GlobalContext';
|
||||||
import PropagateLoader from 'react-spinners/PropagateLoader';
|
import PropagateLoader from 'react-spinners/PropagateLoader';
|
||||||
import { BackstoryTextField, BackstoryTextFieldRef } from 'components/BackstoryTextField';
|
import { BackstoryTextField, BackstoryTextFieldRef } from 'components/BackstoryTextField';
|
||||||
|
@ -227,7 +227,6 @@ const HeroButton = (props: HeroButtonProps) => {
|
|||||||
|
|
||||||
const HowItWorks: React.FC = () => {
|
const HowItWorks: React.FC = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const theme = useTheme();
|
|
||||||
|
|
||||||
const handleGetStarted = () => {
|
const handleGetStarted = () => {
|
||||||
navigate('/job-analysis');
|
navigate('/job-analysis');
|
||||||
|
@ -24,9 +24,8 @@ import { LoginForm } from 'components/EmailVerificationComponents';
|
|||||||
import { CandidateRegistrationForm } from 'pages/candidate/RegistrationForms';
|
import { CandidateRegistrationForm } from 'pages/candidate/RegistrationForms';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import { useAppState } from 'hooks/GlobalContext';
|
import { useAppState } from 'hooks/GlobalContext';
|
||||||
import * as Types from 'types/types';
|
|
||||||
|
|
||||||
const LoginPage: React.FC<BackstoryPageProps> = (props: BackstoryPageProps) => {
|
const LoginPage: React.FC<BackstoryPageProps> = (_props: BackstoryPageProps) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { setSnack } = useAppState();
|
const { setSnack } = useAppState();
|
||||||
const [tabValue, setTabValue] = useState<string>('login');
|
const [tabValue, setTabValue] = useState<string>('login');
|
||||||
|
@ -2,7 +2,6 @@ import React, { useEffect } from 'react';
|
|||||||
import { useParams, useNavigate } from 'react-router-dom';
|
import { useParams, useNavigate } from 'react-router-dom';
|
||||||
import { Box } from '@mui/material';
|
import { Box } from '@mui/material';
|
||||||
|
|
||||||
import { SetSnackType } from '../components/Snack';
|
|
||||||
import { LoadingComponent } from '../components/LoadingComponent';
|
import { LoadingComponent } from '../components/LoadingComponent';
|
||||||
import { User, Guest, Candidate } from 'types/types';
|
import { User, Guest, Candidate } from 'types/types';
|
||||||
import { useAuth } from 'hooks/AuthContext';
|
import { useAuth } from 'hooks/AuthContext';
|
||||||
@ -13,7 +12,7 @@ interface CandidateRouteProps {
|
|||||||
user?: User | null;
|
user?: User | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CandidateRoute: React.FC<CandidateRouteProps> = (props: CandidateRouteProps) => {
|
const CandidateRoute: React.FC<CandidateRouteProps> = (_props: CandidateRouteProps) => {
|
||||||
const { apiClient } = useAuth();
|
const { apiClient } = useAuth();
|
||||||
const { selectedCandidate, setSelectedCandidate } = useSelectedCandidate();
|
const { selectedCandidate, setSelectedCandidate } = useSelectedCandidate();
|
||||||
const { setSnack } = useAppState();
|
const { setSnack } = useAppState();
|
||||||
|
@ -1470,11 +1470,13 @@ class ApiClient {
|
|||||||
let streamingMessage: Types.ChatMessageStreaming | null = null;
|
let streamingMessage: Types.ChatMessageStreaming | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (true) {
|
let exit = false;
|
||||||
|
while (!exit) {
|
||||||
const { done, value } = await reader.read();
|
const { done, value } = await reader.read();
|
||||||
|
|
||||||
if (done) {
|
if (done) {
|
||||||
// Stream ended naturally
|
// Stream ended naturally
|
||||||
|
exit = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1495,6 +1497,7 @@ class ApiClient {
|
|||||||
// Handle different status types
|
// Handle different status types
|
||||||
switch (incoming.status) {
|
switch (incoming.status) {
|
||||||
case 'streaming':
|
case 'streaming':
|
||||||
|
{
|
||||||
const streaming = Types.convertChatMessageStreamingFromApi(incoming);
|
const streaming = Types.convertChatMessageStreamingFromApi(incoming);
|
||||||
if (streamingMessage === null) {
|
if (streamingMessage === null) {
|
||||||
streamingMessage = { ...streaming };
|
streamingMessage = { ...streaming };
|
||||||
@ -1506,19 +1509,25 @@ class ApiClient {
|
|||||||
streamingMessage.timestamp = streaming.timestamp;
|
streamingMessage.timestamp = streaming.timestamp;
|
||||||
}
|
}
|
||||||
options.onStreaming?.(streamingMessage);
|
options.onStreaming?.(streamingMessage);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'status':
|
case 'status':
|
||||||
|
{
|
||||||
const status = Types.convertChatMessageStatusFromApi(incoming);
|
const status = Types.convertChatMessageStatusFromApi(incoming);
|
||||||
options.onStatus?.(status);
|
options.onStatus?.(status);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'error':
|
case 'error':
|
||||||
|
{
|
||||||
const error = Types.convertChatMessageErrorFromApi(incoming);
|
const error = Types.convertChatMessageErrorFromApi(incoming);
|
||||||
options.onError?.(error);
|
options.onError?.(error);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'done':
|
case 'done':
|
||||||
|
{
|
||||||
const message = (
|
const message = (
|
||||||
modelType
|
modelType
|
||||||
? convertFromApi<T>(parseApiResponse<T>(incoming), modelType)
|
? convertFromApi<T>(parseApiResponse<T>(incoming), modelType)
|
||||||
@ -1530,6 +1539,7 @@ class ApiClient {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('onMessage handler failed: ', error);
|
console.error('onMessage handler failed: ', error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1538,7 +1548,6 @@ class ApiClient {
|
|||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
options.onWarn?.(error.message);
|
options.onWarn?.(error.message);
|
||||||
}
|
}
|
||||||
// Continue processing other lines
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user