This package exposes TF1 hug room component.
Install package with npm
npm install @livelike/tf-hug-room
Once dependency is added to project. You need to use LLHugMainComponent
to render Hug Room UI.
Example:
import './App.css';
import { LLHugMainComponent, useLivelikeInit } from '@livelike/tf-hug-room';
function App() {
const clientId = '{your-client-id}';
const { loaded: livelikeLoaded, profile } = useLivelikeInit({
clientId: clientId
})
if (!livelikeLoaded) {
return (
<p>Loading...</p>
);
}
if (!profile) {
return <p>Error In Loading livelike...</p>
}
return (
<div className="App">
<LLHugMainComponent clientId="{clientId}" customId="tf1live"></LLHugMainComponent>
</div>
);
}
export default App;```