fix: add small fixes

This commit is contained in:
Pavel Torbeev 2023-09-09 03:49:46 +03:00
parent 3815bb7b5e
commit dbfd8e8b4f
8 changed files with 28 additions and 14 deletions

View File

@ -4,7 +4,7 @@
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="theme-color" content="#fafafa" />
<meta
name="description"
content="Web site created using create-react-app"

View File

@ -17,6 +17,7 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-feature-settings: 'pnum' on, 'lnum' on;
overflow-x: hidden;
}
h1,

View File

@ -24,13 +24,15 @@
.DefaultLayout__header {
display: grid;
gap: $spacing-small-4x $spacing-medium;
margin-bottom: $spacing-medium-x;
@include mobile-up {
grid-template: 'mopus cp cbr'/ auto 1fr auto;
grid-template:
'mopus cp cbr'
/ auto 1fr auto;
height: $header-height;
align-items: center;
column-gap: $spacing-medium;
}
@include mobile-down {
@ -39,11 +41,12 @@
'mopus cbr'
/ 1fr auto;
align-items: center;
row-gap: $spacing-small-4x;
}
}
.DefaultLayout__logo {
width: fit-content;
width: auto;
height: 40px;
}
@ -54,7 +57,11 @@
margin-right: auto;
grid-area: mopus;
height: $header-height;
width: fit-content;
}
.DefaultLayout__logo_mopus {
width: auto;
height: 100%;
}
.DefaultLayout__logo_cp {

View File

@ -2,9 +2,9 @@ import { Link, Outlet } from 'react-router-dom';
import clsx from 'clsx';
import { ReactFCC } from '../../../utils/ReactFCC';
import { HOME_PAGE_ROUTE } from '../../../app/routes';
import cbrLogoSrc from './assets/cbr-logo.svg';
import cpLogoSrc from './assets/cp-logo.svg';
import mopusLogoSrc from './assets/mopus-logo.svg';
import cbrLogoSrc from './assets/cbr-logo.png';
import cpLogoSrc from './assets/cp-logo.png';
import mopusLogoSrc from './assets/mopus-logo.png';
import s from './DefaultLayout.module.scss';
export const DefaultLayout: ReactFCC = () => {
@ -13,7 +13,7 @@ export const DefaultLayout: ReactFCC = () => {
<div className={s.DefaultLayout__container}>
<header className={s.DefaultLayout__header}>
<Link to={HOME_PAGE_ROUTE} className={s.DefaultLayout__logoMopusContainer} reloadDocument>
<img className={s.DefaultLayout__logo} src={mopusLogoSrc} alt={''} />
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_mopus)} src={mopusLogoSrc} alt={''} />
</Link>
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_cp)} src={cpLogoSrc} alt={''} />
<img className={clsx(s.DefaultLayout__logo, s.DefaultLayout__logo_cbr)} src={cbrLogoSrc} alt={''} />

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -37,7 +37,14 @@ export const HomePage: ReactFCC = () => {
}
});
const [processId, setProcessId] = useState<string | null>(null);
// const [processId, setProcessId] = useState<string | null>(null);
const {
data: createProcessResponse,
mutateAsync: createProcess,
isLoading: createProcessLoading
} = useCreateProcess();
const processId = createProcessResponse?.id;
const {
data: process,
@ -50,8 +57,6 @@ export const HomePage: ReactFCC = () => {
}
});
const { mutateAsync: createProcess, isLoading: createProcessLoading } = useCreateProcess();
const timeout = useSingleTimeout();
const onSubmit: SubmitHandler<FormFields> = useCallback(
@ -61,7 +66,7 @@ export const HomePage: ReactFCC = () => {
files: data.files
});
setProcessId(response.id);
// setProcessId(response.id);
},
[createProcess]
);
@ -110,7 +115,8 @@ export const HomePage: ReactFCC = () => {
// ------ Логика UI ------
const isLoading = createProcessLoading || processFetching || !!(process && process.current < process.total);
const isLoading =
createProcessLoading || !!processId || processFetching || !!(process && process.current < process.total);
const isDisabled = !currentText && currentFiles.length === 0;
return (