redirect buttons and api url fixes
This commit is contained in:
@ -16,7 +16,7 @@ import { fetchAuth } from '../../server/server'
|
||||
|
||||
import { useSelector } from 'react-redux'
|
||||
import { selectAuth } from '../../redux/outstaffingSlice';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import { Redirect, Link } from 'react-router-dom';
|
||||
|
||||
const AuthForDevelopers = () => {
|
||||
const dispatch = useDispatch()
|
||||
@ -77,6 +77,10 @@ const AuthForDevelopers = () => {
|
||||
>
|
||||
Войти
|
||||
</button>
|
||||
|
||||
<button className={`${style.form__btn} ${style.auth__link}`}>
|
||||
<Link to='/auth'>Для партнёров</Link>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -399,3 +399,16 @@
|
||||
line-height: normal;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.auth__link {
|
||||
display: block;
|
||||
margin-top: 1.3rem;
|
||||
}
|
||||
|
||||
|
||||
.auth__link a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
}
|
@ -16,7 +16,7 @@ import { fetchAuth } from '../../server/server'
|
||||
|
||||
import { useSelector } from 'react-redux'
|
||||
import { selectAuth } from '../../redux/outstaffingSlice';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
import { Redirect, Link } from 'react-router-dom';
|
||||
|
||||
const AuthForPartners = () => {
|
||||
const dispatch = useDispatch()
|
||||
@ -70,6 +70,10 @@ const AuthForPartners = () => {
|
||||
}>
|
||||
Войти
|
||||
</button>
|
||||
|
||||
<button className={`${style.form__btn} ${style.auth__link}`}>
|
||||
<Link to='/authdev'>Для разработчиков</Link>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -400,3 +400,15 @@
|
||||
line-height: normal;
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.auth__link {
|
||||
display: block;
|
||||
margin-top: 1.3rem;
|
||||
}
|
||||
|
||||
.auth__link a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: #fff;
|
||||
}
|
@ -18,7 +18,7 @@ const Candidate = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
fetchItemsForId('https://guild.craft-group.xyz/api/profile/', Number(candidateId)).then((el) =>
|
||||
fetchItemsForId(`${process.env.REACT_APP_API_URL}/api/profile/`, Number(candidateId)).then((el) =>
|
||||
dispatch(currentCandidate(el))
|
||||
);
|
||||
}, [dispatch, candidateId]);
|
||||
|
@ -14,7 +14,7 @@ const Description = ({ onLoadMore }) => {
|
||||
const [allCandidates, getAllCandidates] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchProfile('https://guild.craft-group.xyz/api/profile?limit=', 1000).then((p) => getAllCandidates(p));
|
||||
fetchProfile(`${process.env.REACT_APP_API_URL}/api/profile?limit=`, 1000).then((p) => getAllCandidates(p));
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
@ -30,7 +30,7 @@ const Form = () => {
|
||||
formData.append('phone', data.phone);
|
||||
formData.append('comment', data.comment);
|
||||
|
||||
fetchForm('https://guild.craft-group.xyz/api/profile/add-to-interview', formData);
|
||||
fetchForm(`${process.env.REACT_APP_API_URL}/api/profile/add-to-interview`, formData);
|
||||
};
|
||||
|
||||
const goBack = () => {
|
||||
|
@ -11,11 +11,11 @@ const Home = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
useEffect(() => {
|
||||
fetchProfile('https://guild.craft-group.xyz/api/profile?limit=', index).then((profileArr) =>
|
||||
fetchProfile(`${process.env.REACT_APP_API_URL}/api/profile?limit=`, index).then((profileArr) =>
|
||||
dispatch(profiles(profileArr))
|
||||
);
|
||||
|
||||
fetchSkills('https://guild.craft-group.xyz/api/skills/skills-on-main-page').then((skills) => {
|
||||
fetchSkills(`${process.env.REACT_APP_API_URL}/api/skills/skills-on-main-page`).then((skills) => {
|
||||
const keys = Object.keys(skills);
|
||||
const values = Object.values(skills);
|
||||
|
||||
|
@ -28,7 +28,7 @@ const Outstaffing = () => {
|
||||
<div className="row">
|
||||
<div className="col-12 col-xl-4">
|
||||
<OutstaffingBlock
|
||||
dataTags={tagsArr.flat().filter((tag) => tag.name === 'skills_front')}
|
||||
dataTags={tagsArr && tagsArr.flat().filter((tag) => tag.name === 'skills_front')}
|
||||
img={front}
|
||||
header="Фронтенд"
|
||||
/>
|
||||
|
@ -15,7 +15,7 @@ const TagSelect = () => {
|
||||
const handleSubmit = () => {
|
||||
const filterItemsId = itemsArr.map((item) => item.id).join();
|
||||
|
||||
fetchItemsForId(`https://guild.craft-group.xyz/api/profile?skills=`, filterItemsId).then((el) =>
|
||||
fetchItemsForId(`${process.env.REACT_APP_API_URL}/api/profile?skills=`, filterItemsId).then((el) =>
|
||||
dispatch(filteredCandidates(el))
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user