Удалил старые запросы к апи, переписал страницу тестов на новый конструктор запроса. Обновил библиотеки, в том числе реакт до последней версии, переписал устаревший код с библиотек.
This commit is contained in:
parent
cc8ef27ec0
commit
df1e8707d1
44612
package-lock.json
generated
44612
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,8 @@
|
|||||||
"resolve": "1.18.1",
|
"resolve": "1.18.1",
|
||||||
"resolve-url-loader": "^3.1.2",
|
"resolve-url-loader": "^3.1.2",
|
||||||
"semver": "7.3.2",
|
"semver": "7.3.2",
|
||||||
"sweetalert2": "^11.4.8"
|
"sweetalert2": "^11.4.8",
|
||||||
|
"ts-loader": "^9.4.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.20.12",
|
"@babel/core": "^7.20.12",
|
||||||
|
@ -4,7 +4,7 @@ import {useDispatch, useSelector} from 'react-redux'
|
|||||||
import {
|
import {
|
||||||
selectItems,
|
selectItems,
|
||||||
selectedItems,
|
selectedItems,
|
||||||
profiles,
|
profiles,
|
||||||
} from '../../redux/outstaffingSlice'
|
} from '../../redux/outstaffingSlice'
|
||||||
|
|
||||||
import {apiRequest} from "../../api/request";
|
import {apiRequest} from "../../api/request";
|
||||||
@ -80,40 +80,22 @@ const OutstaffingBlock = (
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OutsideClickHandler
|
<OutsideClickHandler onOutsideClick={() => isSelected && onSelect(null)}>
|
||||||
onOutsideClick={() => {
|
<div className={`outstaffing-block${isSelected ? ' outstaffing-block__selected' : ''}`}>
|
||||||
isSelected && onSelect(null)
|
<div className={`outstaffing-block__img ${selected ? ' outstaffing-block__border' : ''}`}
|
||||||
}}
|
onClick={() => handlePositionClick(
|
||||||
>
|
{
|
||||||
<div
|
dispatch,
|
||||||
className={`outstaffing-block${
|
positionId,
|
||||||
isSelected ? ' outstaffing-block__selected' : ''
|
isSelected,
|
||||||
}`}
|
onSelect,
|
||||||
>
|
apiRequest
|
||||||
<div
|
})
|
||||||
className={`outstaffing-block__img ${
|
}>
|
||||||
selected ? ' outstaffing-block__border' : ''
|
|
||||||
}`}
|
|
||||||
onClick={() =>
|
|
||||||
handlePositionClick({
|
|
||||||
dispatch,
|
|
||||||
positionId,
|
|
||||||
isSelected,
|
|
||||||
onSelect,
|
|
||||||
apiRequest
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<h3>{header}</h3>
|
<h3>{header}</h3>
|
||||||
<img className={classes} src={img} alt='img'/>
|
<img className={classes} src={img} alt='img'/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className={`${selected ? 'outstaffing-block__mobile--block' : 'outstaffing-block__mobile--none'}`} >
|
||||||
className={`${
|
|
||||||
selected
|
|
||||||
? 'outstaffing-block__mobile--block'
|
|
||||||
: 'outstaffing-block__mobile--none'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<p className='outstaffing-block__text'># Популярный стек</p>
|
<p className='outstaffing-block__text'># Популярный стек</p>
|
||||||
{dataTags && (
|
{dataTags && (
|
||||||
<ul className='outstaffing-block__items'>
|
<ul className='outstaffing-block__items'>
|
||||||
|
9
tsconfig.json
Normal file
9
tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5", // компилируем ts код в js код версии ES5
|
||||||
|
"module": "esnext",
|
||||||
|
// для поддержки динамического импорта модулей
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"jsx": "react"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user