Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Commit 6a0b1ce

Browse files
committed
iscb
1 parent 85cdd84 commit 6a0b1ce

1 file changed

Lines changed: 1 addition & 32 deletions

File tree

src/app/containers/ResourceCreate.jsx

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -134,34 +134,10 @@ class ResourceCreate extends React.Component {
134134
// .then(findresponse2 => {
135135
// this.setState({ csrf: findresponse2 });
136136
// });
137-
// fetch(`https://tess.elixir-europe.org/events?page_size=100`, {
138-
// method: 'GET',
139-
// headers: {
140-
// accept: 'application/vnd.api+json'
141-
// }
142-
// })
143-
// .then(response => response.json())
144-
// .then(response => {
145-
// this.setState({ tessResources: response });
146-
// });
147137
}
148138

149139
changeCategory(value) {
150140
this.setState({ category: value.toLowerCase(), loading: true });
151-
// fetch(
152-
// `https://tess.elixir-europe.org/${value.toLowerCase()}?page_size=5000&include_expired=true`,
153-
// {
154-
// method: 'GET',
155-
// headers: {
156-
// accept: 'application/vnd.api+json'
157-
// }
158-
// }
159-
// )
160-
// .then(response => response.json())
161-
// .then(response => {
162-
// this.setState({ tessResources: response, loading: false });
163-
// });
164-
165141
fetch(
166142
`https://tess.elixir-europe.org/content_providers?page_size=200&sort=asc`,
167143
{
@@ -245,9 +221,6 @@ class ResourceCreate extends React.Component {
245221

246222
handleSubmit(event) {
247223
event.preventDefault();
248-
// let title = this.refs.title.value;
249-
// let dates = this.refs.dates.value;
250-
// let dates2 = this.refs.dates2.value;
251224
let title = this.state.title;
252225
let dates = this.state.dates;
253226
let dates2 = this.state.dates2;
@@ -257,13 +230,10 @@ class ResourceCreate extends React.Component {
257230
}
258231

259232
let description = this.state.description;
260-
// let location = this.refs.location.value;
261-
// let url = this.refs.url.value;
262233
let location = this.state.location;
263234
let url = this.state.url;
264235
let target_audience = this.state.target_audience;
265236
let learning_outcomes = this.state.learning_outcomes;
266-
// let keywords = this.refs.keywords.value;
267237
let keywords = this.state.keywords;
268238
let organisers = this.state.organisers;
269239
let trainers = this.state.trainers;
@@ -275,8 +245,6 @@ class ResourceCreate extends React.Component {
275245
let tess_conten_provider = this.state.provider;
276246

277247
let token = localStorage.getItem('csrf_token');
278-
279-
//alert(learning_outcomes);
280248
if (this.dateValidate(dates, dates2)) {
281249
fetch(`${apiUrl}/node?_format=hal_json`, {
282250
credentials: 'include',
@@ -389,6 +357,7 @@ class ResourceCreate extends React.Component {
389357
data._links.self.href
390358
)}`
391359
});
360+
// console.log(data.path);
392361
});
393362
} else {
394363
alert('Incorrect dates');

0 commit comments

Comments
 (0)