add fetch inquiry
This commit is contained in:
parent
b0ca345dbb
commit
8e607ee21f
@ -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);
|
||||
|
@ -38,6 +38,12 @@
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
.input__text > input {
|
||||
max-width: 460px;
|
||||
}
|
||||
}
|
||||
|
||||
.input__number > input {
|
||||
width: 141px;
|
||||
height: 42px;
|
||||
@ -50,6 +56,12 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
.input__number > input {
|
||||
max-width: 141px;
|
||||
}
|
||||
}
|
||||
|
||||
.reportForm__form > img {
|
||||
margin-top: 5px;
|
||||
width: 23px;
|
||||
|
@ -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
6
src/server/server.js
Normal file
@ -0,0 +1,6 @@
|
||||
export const fetchProfile = async (link, index = '') => {
|
||||
const response = await fetch(`${link}/${index}`);
|
||||
let data = await response.json();
|
||||
|
||||
return data;
|
||||
};
|
Loading…
Reference in New Issue
Block a user