$if ctx.user:
$code:
accountProps = {
'name': 'account',
'label': 'My account',
# It seems like in the local dev environment (and presumably _only_ in the local
# dev environment), this get_internet_archive_id returns None. Setting it to an
# empty string returns a valid image ¯\_(ツ)_/¯
'image': 'https://archive.org/services/img/' + (get_internet_archive_id(ctx.user.key) or ''),
'image-class': 'header-dropdown__icon',
'links': loginLinks
}
$accountProps['links'].insert(5, { "href": "/account/books/notes", "text": _("My Book Notes") })
$:render_template("lib/header_dropdown", accountProps )
$:render_template("lib/header_dropdown", hamburgerProps )