diff --git a/src/components/Form/Form.module.css b/src/components/Form/Form.module.css
index 8c625c7d..03e6f17a 100644
--- a/src/components/Form/Form.module.css
+++ b/src/components/Form/Form.module.css
@@ -15,7 +15,6 @@
line-height: 16.81px;
text-align: left;
margin-bottom: 20px;
- margin-left: 45px;
}
.form > input {
diff --git a/src/components/Home/Home.js b/src/components/Home/Home.js
index 46895912..52d1f491 100644
--- a/src/components/Home/Home.js
+++ b/src/components/Home/Home.js
@@ -11,9 +11,9 @@ const Home = () => {
const dispatch = useDispatch();
useEffect(() => {
- fetchProfile('https://guild.craft-group.xyz/api/profile?limit=', index)
- .then((profileArr) => dispatch(profiles(profileArr)))
- .catch((e) => console.log(e));
+ fetchProfile('https://guild.craft-group.xyz/api/profile?limit=', index).then((profileArr) =>
+ dispatch(profiles(profileArr))
+ );
fetchSkills('https://guild.craft-group.xyz/api/skills/skills-on-main-page').then((skills) => {
const keys = Object.keys(skills);
diff --git a/src/server/server.js b/src/server/server.js
index d9ee160e..18fc8516 100644
--- a/src/server/server.js
+++ b/src/server/server.js
@@ -1,32 +1,40 @@
export const fetchProfile = async (link, index) => {
- const response = await fetch(`${link}${index}`);
- let data = await response.json();
+ try {
+ const response = await fetch(`${link}${index}`);
+ let data = await response.json();
- return data;
+ return data;
+ } catch (error) {}
};
export const fetchSkills = async (link) => {
- const response = await fetch(link);
- let data = await response.json();
+ try {
+ const response = await fetch(link);
+ let data = await response.json();
- return data;
+ return data;
+ } catch (error) {}
};
export const fetchItemsForId = async (link, id) => {
- const response = await fetch(`${link}${id}`);
- let data = await response.json();
+ try {
+ const response = await fetch(`${link}${id}`);
+ let data = await response.json();
- return data;
+ return data;
+ } catch (error) {}
};
export const fetchForm = async (link, info) => {
- const response = await fetch(link, {
- method: 'POST',
- headers: {
- 'Content-Type': 'multipart/form-data',
- },
- body: info,
- });
+ try {
+ const response = await fetch(link, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ body: info,
+ });
- return response;
+ return response;
+ } catch (error) {}
};