How to display the User on the UI of the Jira Admin Module

Hi,

I am trying to display the Jira User on my app UI but it gives an error. Following 2 methods don’t work:

const App = () => {

    return (
        <AdminPage>
            <Text>
                Driver: <User accountId="5a1234bc8d12345e3f1g11hi" />
            </Text>
        </AdminPage>
    );
};

export const run = render(
    <App />
);

I am using the adminPage module. I used User component directly and also in the Text module. Both didn’t work. I am getting the error as follows:

Something went wrong
Trace ID: 27da991f8d930a81
There was an error invoking the function - Unexpected child type: object. Valid children are @forge/ui components, function components, and strings.
Error occurred in Text:
	in AdminPage
	in App

Error: Unexpected child type: object. Valid children are @forge/ui components, function components, and strings.
Error occurred in Text:
	in AdminPage
	in App
    at index.js:4896:11
    at asyncMap (index.js:4810:30)
    at async index.js:4831:29
    at async asyncMap (index.js:4810:24)
    at async index.js:4831:29
    at async asyncMap (index.js:4810:24)
    at async index.js:4893:23

Thank you
Hakan Bahadir

Hi @HakanBahadir1, I think that you didn’t paste the code. Can you provide more details of which methods don’t work?

Just updated… thanks

Hi @HakanBahadir1. You need to wrap a raw text with Text component.

Hi Adam, I didn’t understand. The User component is already wrapped with Text component in my example above. It is actually a copy paste from the documentation page.

Moreover, even though it is mentioned that “The User component can also be used outside a Text component”, it also gives a similar error. :frowning:

Hakan

Hi @HakanBahadir1,

I suspect you may be using an out-of-date version of @forge/ui.

Can you try updating to the latest @forge/ui version (1.0.0) and trying again?

Hi,

I guess I am stuck at @forge/ui version 0.13.1. And it does not get updated. Where could be the blocker?

Thanks