Skip to content

Commit

Permalink
Refactor SingleSidebar component
Browse files Browse the repository at this point in the history
  • Loading branch information
Adammatthiesen committed Dec 18, 2024
1 parent 4e27573 commit 7c54c3e
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions packages/studiocms_dashboard/src/components/SingleSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,29 @@ const t = useTranslations(lang, '@studiocms/dashboard:sidebar');
<span slot="fallback">Loading</span>
</Admin>
</div>
<Dropdown
id='sidebar-user-dropdown'
options={[
{ label: t("user-dropdown:settings"), value: 'user-settings', icon: "user", href: StudioCMSRoutes.mainLinks.userProfile },
{ label: t("user-dropdown:view-site"), value: 'view-site', icon: "globe-alt", href: StudioCMSRoutes.mainLinks.baseSiteURL },
{ label: t("user-dropdown:logout"), value: 'log-out', icon: "arrow-left-start-on-rectangle", href: StudioCMSRoutes.authLinks.logoutURL },
]}
offset={8}
transition:persist transition:persist-props
>
<div>
{ versionCheck && (
<VersionCheck server:defer>
<span slot="fallback"></span>
</VersionCheck>
)}
<div class="user-dropdown-trigger-container">
<UserAccount server:defer transition:persist transition:persist-props>
<User slot="fallback" name={"Visitor"} description={'Unknown'} />
</UserAccount>
</div>
</Dropdown>
<Dropdown
id='sidebar-user-dropdown'
options={[
{ label: t("user-dropdown:settings"), value: 'user-settings', icon: "user", href: StudioCMSRoutes.mainLinks.userProfile },
{ label: t("user-dropdown:view-site"), value: 'view-site', icon: "globe-alt", href: StudioCMSRoutes.mainLinks.baseSiteURL },
{ label: t("user-dropdown:logout"), value: 'log-out', icon: "arrow-left-start-on-rectangle", href: StudioCMSRoutes.authLinks.logoutURL },
]}
offset={8}
transition:persist transition:persist-props
>
<div class="user-dropdown-trigger-container">
<UserAccount server:defer transition:persist transition:persist-props>
<User slot="fallback" name={"Visitor"} description={'Unknown'} />
</UserAccount>
</div>
</Dropdown>
</div>
</Sidebar>

<script>
Expand Down

0 comments on commit 7c54c3e

Please sign in to comment.