add fetch inquiry

This commit is contained in:
Hope87 2021-06-28 17:57:28 +03:00
parent b0ca345dbb
commit 8e607ee21f
4 changed files with 84 additions and 53 deletions

View File

@ -4,6 +4,7 @@ import Description from '../Description/Description';
import front from '../../images/front_end.png';
import back from '../../images/back_end.png';
import design from '../../images/design.png';
// import { fetchProfile } from '../../server/server';
export const candidatesList = [
{
@ -58,6 +59,15 @@ const Home = () => {
const [selectedTab, setSelectedTab] = useState('');
// useEffect(() => {
// setTabs(tabsList);
// setCandidates(candidatesList);
// fetchProfile('https://guild.craft-group.xyz/api/profile')
// .then((profileArr) => setProfiles(profileArr))
// .catch((e) => console.log(e));
// }, []);
useEffect(() => {
setTabs(tabsList);
setCandidates(candidatesList);
@ -65,7 +75,6 @@ const Home = () => {
fetch('https://guild.craft-group.xyz/api/skills/skills-on-main-page')
.then((response) => response.json())
.then((res) => {
console.log('RES', res);
const keys = Object.keys(res);
const values = Object.values(res);

View File

@ -4,9 +4,9 @@
justify-content: space-between;
margin-left: 14px;
margin-bottom: 28px;
}
}
.reportForm__form > span {
.reportForm__form > span {
font-family: 'GT Eesti Pro Display';
font-size: 2em;
font-weight: 700;
@ -16,16 +16,16 @@
position: absolute;
left: 0;
bottom: 7px;
}
}
.input__text,
.input__number {
.input__text,
.input__number {
display: flex;
flex-direction: column;
margin-left: 20px;
}
}
.input__text > input {
.input__text > input {
width: 460px;
height: 42px;
box-shadow: 0 0 59px rgba(44, 44, 44, 0.05);
@ -36,9 +36,15 @@
font-size: 1.8em;
padding-left: 20px;
padding-right: 20px;
}
}
.input__number > input {
@media (max-width: 575.98px) {
.input__text > input {
max-width: 460px;
}
}
.input__number > input {
width: 141px;
height: 42px;
box-shadow: 0 0 59px rgba(44, 44, 44, 0.05);
@ -48,10 +54,16 @@
outline: none;
font-size: 1.8em;
text-align: center;
}
}
.reportForm__form > img {
@media (max-width: 575.98px) {
.input__number > input {
max-width: 141px;
}
}
.reportForm__form > img {
margin-top: 5px;
width: 23px;
height: 23px;
}
}

View File

@ -122,6 +122,10 @@
border-radius: 5px;
border: 1px solid #c4c4c4;
background-color: #ffffff;
font-size: 1.8em;
padding-left: 20px;
padding-right: 20px;
outline: none;
}
.reportForm__footer {

6
src/server/server.js Normal file
View File

@ -0,0 +1,6 @@
export const fetchProfile = async (link, index = '') => {
const response = await fetch(`${link}/${index}`);
let data = await response.json();
return data;
};