-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from allbertuu/feature/budget-contact
Feature/budget contact
- Loading branch information
Showing
8 changed files
with
49 additions
and
56 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/components/BudgetContact/__tests__/BudgetContact.spec.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,12 @@ | ||
import budgetEmail from '@/data/budgetEmail.json'; | ||
import { render, screen } from '@/utils/testUtils'; | ||
import { BudgetContact } from '..'; | ||
|
||
test('button have the budget email link to reach me out', async () => { | ||
render(<BudgetContact />); | ||
|
||
const button = screen.getByText(/obtenha um orçamento agora/i); | ||
const emailLink = `mailto:${budgetEmail.recipient}?subject=${budgetEmail.subject}&body=${budgetEmail.body}`; | ||
|
||
expect(button).toHaveAttribute('href', emailLink); | ||
}); |
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,20 @@ | ||
import budgetEmail from '@/data/budgetEmail.json'; | ||
import { EnvelopeSimple } from '@phosphor-icons/react'; | ||
|
||
export const BudgetContact: React.FC = () => { | ||
const emailLink = `mailto:${budgetEmail.recipient}?subject=${budgetEmail.subject}&body=${budgetEmail.body}`; | ||
|
||
return ( | ||
<a | ||
title="Contato" | ||
className="originRightReveal btn btn-accent" | ||
href={emailLink} | ||
> | ||
<EnvelopeSimple | ||
weight="fill" | ||
className="-mt-1 mr-2 inline-block text-xl text-white" | ||
/> | ||
Obtenha um Orçamento Agora | ||
</a> | ||
); | ||
}; |
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
21 changes: 0 additions & 21 deletions
21
src/components/SendMeAnEmail/__tests__/SendMeAnEmail.spec.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
{ | ||
"subject": "Solicitação de Orçamento para Desenvolvimento de Website/E-commerce/Landing page", | ||
"body": "Olá, Alberto! Espero que esteja tudo bem com você. Estou entrando em contato para discutir a possibilidade de agendar uma reunião ou uma chamada para discutir melhor as necessidades e os detalhes do meu projeto [Seu projeto]...", | ||
"recipient": "[email protected]" | ||
} |
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