Skip to content

Commit

Permalink
feat: open website handle
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-ext committed Feb 28, 2024
1 parent 9ac7092 commit c80b9f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/com/components/views/profiles/ProfileHandleAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Flyout, offsetlessMiddlewares } from '../../Flyout';

import ContentCopyIcon from '../../../icons/baseline-content-copy';
import HistoryIcon from '../../../icons/baseline-history';
import LaunchIcon from '../../../icons/baseline-launch';

const HandleHistoryDialog = lazy(() => import('../../dialogs/HandleHistoryDialog'));

Expand All @@ -27,6 +28,16 @@ const ProfileHandleAction = (props: ProfileHandleActionProps) => {
<Flyout button={props.children} placement="bottom-start" middleware={offsetlessMiddlewares}>
{({ close, menuProps }) => (
<div {...menuProps} class={/* @once */ MenuRoot()}>
<a
href={`https://${profile.handle.value}`}
target="_blank"
onClick={close}
class={/* @once */ MenuItem()}
>
<LaunchIcon class={/* @once */ MenuItemIcon()} />
<span>Open website</span>
</a>

<button
onClick={() => {
close();
Expand Down

0 comments on commit c80b9f1

Please sign in to comment.