-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
172 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/javascript/src/components/Invoices/common/InvoiceForm/SendInvoice/Recipient.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
|
||
import { XIcon } from "miruIcons"; | ||
|
||
import { useUserContext } from "context/UserContext"; | ||
|
||
const Recipient: React.FC<{ email: string; handleClick: any }> = ({ | ||
email, | ||
handleClick, | ||
}) => { | ||
const { user } = useUserContext(); | ||
|
||
return ( | ||
<div className="space-XIcon-2 m-0.5 flex w-fit items-center rounded-full border bg-miru-gray-400 px-2 py-1"> | ||
<p>{email}</p> | ||
{user.email == "supriya@saeloun.com" && ( | ||
<button | ||
className="text-miru-black-1000 hover:text-miru-red-400" | ||
type="button" | ||
onClick={handleClick} | ||
> | ||
<XIcon size={14} weight="bold" /> | ||
</button> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Recipient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.