humanmade / humanmade/react-oembed-container
Not working, no errors
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
I've tried to use the component and had no errors but it didn't work. Are you guys still maintaining this or I'm missing something?
Here's my component code:
```jsx
import React, { useState, useEffect, Suspense } from 'react';
import EmbedContainer from 'react-oembed-container';
import axios from '../../../../node_modules/axios/dist/axios.js';
const RealTime = () => {
const [content, setContent] = useState('');
useEffect(() => {
const options = {
url: wpApiSettings.root + 'wp/v2/custom-post-type/' + postTypeID,
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json;charset=UTF-8'
},
};
function requestPosts(options) {
axios(options).then( response => {
console.log( response );
setContent( response.data.content.rendered );
});
setTimeout(requestMoments, 20000, options);
};
requestPosts(options);
});
return (
)
}
export default RealTime;
```
Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.