The problem is, I would like to get the CurrentAdmin object on my custom component, but I always got undefined object. Below is my custom component code:
import React from 'react';
import { Box, Label, Button } from 'admin-bro/components';
import { CurrentAdmin } from 'admin-bro';
export default class myCustomComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
record: props.record,
property: props.property,
};
console.log(CurrentAdmin);
}
}
Hi all, great work on the newest version of Adminbro.
I am using authenticatedRouter and I have successfully returned the admin object as follows:
The problem is, I would like to get the CurrentAdmin object on my custom component, but I always got undefined object. Below is my custom component code:
Versions: "admin-bro": "^2.9.0", "admin-bro-expressjs": "^2.1.1", "admin-bro-sequelizejs": "^0.5.1",
Any insight on this problem will be appreciated :) Cheers