[![enter image description here](https://i.stack.imgur.com/JpBSc.png)](https://i.stack.imgur.com/JpBSc.png) [![enter image description here](https://i.stack.imgur.com/glyJe.png)](https://i.stack.imgur.com/glyJe.png)
[![enter image description here](https://i.stack.imgur.com/ncR4j.png)](https://i.stack.imgur.com/ncR4j.png)
import React, { useState ,useEffect} from 'react';

import { Link ,useHistory,useParams} from 'react-router-dom';

import { getDatabase,ref, child, get } from 'firebase/database';

import { auth, db } from './Config/Config';

export default function User()

const [user,setUser]=useState()

const {id}=useParams();

const dbRef = ref(getDatabase());

get(child(dbRef, `AllUsers/${id}`)).then((snapshot) => {

if (snapshot.exists()) {

```
setUser(...snapshot.val());

```

} else {

console.log('user',user)
return (

{id}

```
</div>

```

)
}