Skip to content

Commit

Permalink
register user with LD
Browse files Browse the repository at this point in the history
  • Loading branch information
rberrelleza committed Oct 19, 2022
1 parent 9300fbd commit 8d7f351
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions frontend/src/Admin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import { withLDConsumer } from 'launchdarkly-react-client-sdk';

const adminLink = ({flags}) => {
return (
flags.adminDashboard &&
<div>
{flags.adminDashboard &&
<Link className="button" role="button" to="/admin/users">
<svg height="20" width="20" viewBox="0 0 48 48">
<path fill="#fff" d="M27.3 44h-6.6q-.55 0-.975-.35-.425-.35-.525-.9l-.8-5.05q-.95-.35-2-.95t-1.85-1.25L9.9 37.65q-.55.25-1.1.075T7.95 37l-3.3-5.85q-.3-.5-.15-1.05t.6-.9l4.3-3.15q-.1-.45-.125-1.025Q9.25 24.45 9.25 24q0-.45.025-1.025T9.4 21.95L5.1 18.8q-.45-.35-.6-.9-.15-.55.15-1.05L7.95 11q.3-.55.85-.725.55-.175 1.1.075l4.65 2.15q.8-.65 1.85-1.25t2-.9l.8-5.1q.1-.55.525-.9Q20.15 4 20.7 4h6.6q.55 0 .975.35.425.35.525.9l.8 5.05q.95.35 2.025.925Q32.7 11.8 33.45 12.5l4.65-2.15q.55-.25 1.1-.075t.85.725l3.3 5.8q.3.5.175 1.075t-.625.925l-4.3 3.05q.1.5.125 1.075.025.575.025 1.075t-.025 1.05q-.025.55-.125 1.05l4.3 3.1q.45.35.6.9.15.55-.15 1.05L40.05 37q-.3.55-.85.725-.55.175-1.1-.075l-4.65-2.15q-.8.65-1.825 1.275-1.025.625-2.025.925l-.8 5.05q-.1.55-.525.9-.425.35-.975.35ZM24 30.5q2.7 0 4.6-1.9 1.9-1.9 1.9-4.6 0-2.7-1.9-4.6-1.9-1.9-4.6-1.9-2.7 0-4.6 1.9-1.9 1.9-1.9 4.6 0 2.7 1.9 4.6 1.9 1.9 4.6 1.9Z"/>
</svg>
Admin
</Link>
</Link>}
</div>
);
}

Expand Down
8 changes: 7 additions & 1 deletion frontend/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if (module.hot) {
module.hot.accept();
}

const app = withLDProvider({ clientSideID: process.env.LD_CLIENT_ID })(App);
const app = withLDProvider({
clientSideID: process.env.LD_CLIENT_ID,
user: {
"key": "aa0ceb",
"name": "Cindy Lopez",
"email": "[email protected]"
}, })(App);
const Root = hot(app);
render(<Root />, document.getElementById('root'));

0 comments on commit 8d7f351

Please sign in to comment.