Add new item to user dropdown menu

Yes, sorry, I made a mistake when I copied the code.

By default, you see this in the JS tab.

import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
  // Your code here
});

And then, you put this where the placeholder is.

api.addQuickAccessProfileItem({
  icon: "pencil",
  href: "/somewhere",
  content: "Title"
})

So, the result should look like this:

import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
 api.addQuickAccessProfileItem({
  icon: "pencil",
  href: "/somewhere",
  content: "Title"
 })
});

Above, I had accidentally copied one of the default lines.