Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add gift option to profile menu #4085

Merged
merged 31 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
42d0d19
feat: Add gift option to profile menu
AmarTrebinjac Jan 20, 2025
4637cf2
feat: gift user modal
sshanzel Jan 21, 2025
b6cb571
Merge branch 'MI-751' into MI-755
AmarTrebinjac Jan 21, 2025
456feb0
add the modal
AmarTrebinjac Jan 21, 2025
b6701f1
Merge branch 'main' into MI-751
sshanzel Jan 22, 2025
707572f
feat: search user with mention
sshanzel Jan 22, 2025
3f53473
tmp: show modal
sshanzel Jan 22, 2025
7797626
fix: on change handler
sshanzel Jan 22, 2025
c9c4e2d
fix: debounce
sshanzel Jan 22, 2025
6649903
fix: keyboard navigation
sshanzel Jan 22, 2025
4c43d6c
fix: arrow and on focus
sshanzel Jan 22, 2025
f1c525b
feat: on hover, set selected
sshanzel Jan 22, 2025
84091c1
fix: ref
sshanzel Jan 22, 2025
bbc0c94
fix: index
sshanzel Jan 22, 2025
92d8ee2
fix: overlay append
sshanzel Jan 22, 2025
f577767
fix: interactivity
sshanzel Jan 22, 2025
663a58c
fix: on close
sshanzel Jan 22, 2025
f6c79ff
fix: selected ui
sshanzel Jan 22, 2025
84ab16b
fix: gap
sshanzel Jan 22, 2025
3924acb
fix: alignment
sshanzel Jan 22, 2025
a3c0455
fix: roundness
sshanzel Jan 22, 2025
7a3fd26
fix: TODO
sshanzel Jan 22, 2025
e24a2fb
fix: checking disabled
sshanzel Jan 22, 2025
720a6f1
Revert "tmp: show modal"
sshanzel Jan 22, 2025
3726a1b
fix: missing context provider
sshanzel Jan 22, 2025
72a8eab
Merge branch 'main' into MI-751
sshanzel Jan 22, 2025
dee522c
fix: modal pricing
sshanzel Jan 22, 2025
f25e989
fix: missing preselected user
sshanzel Jan 22, 2025
5b435c1
Merge branch 'main' into MI-751
sshanzel Jan 22, 2025
272965a
Merge branch 'MI-751' into MI-755
AmarTrebinjac Jan 22, 2025
5ac6e75
Merge branch 'MI-746-gifting-plus' into MI-755
AmarTrebinjac Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/shared/src/components/ProfileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { useDndContext } from '../contexts/DndContext';
import { LazyModal } from './modals/common/types';
import { usePlusSubscription } from '../hooks/usePlusSubscription';
import { LogEvent, TargetId } from '../lib/log';
import { GiftIcon } from './icons/gift';

interface ListItem {
title: string;
Expand Down Expand Up @@ -149,6 +150,14 @@ export default function ProfileMenu({
});
}

list.push({
title: 'Gift daily.dev Plus',
buttonProps: {
icon: <GiftIcon />,
onClick: () => openModal({ type: LazyModal.GiftPlus }),
},
});

list.push({
title: 'Logout',
buttonProps: {
Expand Down
9 changes: 9 additions & 0 deletions packages/shared/src/components/icons/gift/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { ReactElement } from 'react';
import React from 'react';
import type { IconProps } from '../../Icon';
import Icon from '../../Icon';
import OutlinedIcon from './outlined.svg';

export const GiftIcon = (props: IconProps): ReactElement => (
<Icon {...props} IconPrimary={OutlinedIcon} IconSecondary={OutlinedIcon} />
);
3 changes: 3 additions & 0 deletions packages/shared/src/components/icons/gift/outlined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading