Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit f92eb1f

Browse files
committed
Updated to use new createnewproject endpoint. Updated search card.
1 parent 386f3e6 commit f92eb1f

File tree

7 files changed

+49
-18
lines changed

7 files changed

+49
-18
lines changed

config/dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
CONNECT_WEBSITE_URL: "https://connect.topcoder-dev.com",
1111

1212
API: {
13-
V5: "https://api.topcoder-dev.com/v5", //"http://localhost:3131/api/v5",
13+
V5: "http://localhost:3131/api/v5", // "https://api.topcoder-dev.com/v5",
1414
V3: "https://api.topcoder-dev.com/v3",
1515
},
1616
};

src/assets/images/world-map-dotted.svg

Lines changed: 2 additions & 0 deletions
Loading

src/assets/images/world-map-search1.svg

Lines changed: 2 additions & 0 deletions
Loading

src/assets/images/world-map-search2.svg

Lines changed: 2 additions & 0 deletions
Loading

src/routes/InputSkills/components/SearchCard/index.jsx

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,44 @@
1-
import React from "react";
1+
import React, { useEffect, useState } from "react";
22
import "./styles.module.scss";
33
import IconEarthSearch from "../../../../assets/images/icon-earth-search.svg";
4-
import CenteredSpinner from "components/CenteredSpinner";
4+
import WorldMapDotted from "../../../../assets/images/world-map-dotted.svg";
5+
import WorldMapSearch1 from "../../../../assets/images/world-map-search1.svg";
6+
import WorldMapSearch2 from "../../../../assets/images/world-map-search2.svg";
57

68
function SearchCard() {
9+
const [searchState, setSearchState] = useState(null);
10+
11+
useEffect(() => {
12+
let timer2;
13+
const timer1 = setTimeout(() => {
14+
setSearchState("state1");
15+
timer2 = setTimeout(() => {
16+
setSearchState("state2");
17+
}, 500);
18+
}, 500);
19+
20+
return () => {
21+
clearTimeout(timer1);
22+
clearTimeout(timer2);
23+
};
24+
}, []);
25+
726
return (
827
<div styleName="search-card">
928
<div styleName="heading">
1029
<IconEarthSearch />
1130
<h3>Search..</h3>
1231
<p>Matching the criteria with 1.5 million members around the world..</p>
1332
</div>
14-
<CenteredSpinner />
33+
<div styleName="map-container">
34+
{!searchState ? (
35+
<WorldMapDotted />
36+
) : searchState === "state1" ? (
37+
<WorldMapSearch1 />
38+
) : (
39+
<WorldMapSearch2 />
40+
)}
41+
</div>
1542
</div>
1643
);
1744
}

src/routes/InputSkills/components/SearchCard/styles.module.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,14 @@
3131
color: #555555;
3232
}
3333
}
34+
35+
.map-container {
36+
display: flex;
37+
flex-direction: row;
38+
justify-content: center;
39+
width: 100%;
40+
41+
svg {
42+
width: 90%;
43+
}
44+
}

src/services/teams.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export const postMembers = (teamId, handles, emails) => {
177177
* @returns {Promise<object>} project object
178178
*/
179179
export const postProject = () => {
180-
const url = `${config.API.V5}/projects/`;
180+
const url = `${config.API.V5}/taas-teams/createTeamRequest`;
181181

182182
const bodyObj = {
183183
name: `project-${Date()}`,
@@ -186,16 +186,3 @@ export const postProject = () => {
186186

187187
return axios.post(url, bodyObj);
188188
};
189-
190-
/**
191-
* Get skills
192-
*
193-
* @param {string|number} page page number
194-
*
195-
* @returns {Promise<object[]>} array of skill items
196-
*/
197-
export const getSkills = (page) => {
198-
const query = `page=${page}&perPage=100`;
199-
200-
return axios.get(`${config.API.V5}/taas-teams/skills?${query}`);
201-
};

0 commit comments

Comments
 (0)