Getting the correct DID to fetch basic profile from Ceramic clay testnet

When fetching did profile via this hook in next.js

import { usePublicRecord } from "";
  const record = usePublicRecord(
    "did:3:<some string value>"

I was able to fetch basic profile data from ceramic.

I’m writing the data by this code and need the DID string that can be used by the hook used above to fetch profile data.

import { EthereumAuthProvider, SelfID, WebClientSession } from "";

  const client = new WebClientSession({
    ceramic: "testnet-clay",
  const authProvider = new EthereumAuthProvider(window.ethereum, address);
  await client.authenticate(authProvider);
  const self = new SelfID({ client });
  const ids = await self.get("basicProfile");

I got the did:key:<some string key>, but it is not fetching anything from previous hook.

I solved it by using _parentId field from the self object. Can fetch all the details through hook component now.