-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): Add workspace removal notification email template (#476)
Co-authored-by: Rajdip Bhattacharya <[email protected]> Co-authored-by: muntaxir4 <[email protected]>
- Loading branch information
1 parent
9efbf2d
commit 40b754f
Showing
14 changed files
with
4,342 additions
and
3,691 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,151 @@ | ||
import * as React from 'react' | ||
import { | ||
Body, | ||
Container, | ||
Head, | ||
Heading, | ||
Html, | ||
Link, | ||
Preview, | ||
Section, | ||
Text | ||
} from '@react-email/components' | ||
import dayjs from 'dayjs' | ||
|
||
interface WorkspaceRemovalEmailProps { | ||
workspaceName: string | ||
removedOn: string | ||
} | ||
|
||
export const RemovedFromWorkspaceEmail = ({ | ||
workspaceName, | ||
removedOn | ||
}: WorkspaceRemovalEmailProps) => { | ||
const formattedRemovedOnDate = dayjs(removedOn).format( | ||
'ddd, MMM D, YYYY h:mm A' | ||
) | ||
|
||
return ( | ||
<Html> | ||
<Head /> | ||
<Preview>Removal from Workspace</Preview> | ||
<Body style={main}> | ||
<Container style={container}> | ||
<Section style={content}> | ||
<Heading style={h1}>Removal from Workspace</Heading> | ||
<Text style={text}>Dear User,</Text> | ||
<Text style={text}> | ||
We hope this email finds you well. We are writing to inform you | ||
that your access to the following workspace has been removed: | ||
</Text> | ||
<Section style={workspaceDetails}> | ||
<Text style={workspaceInfo}> | ||
<strong>Workspace Name:</strong> {workspaceName} | ||
</Text> | ||
<Text style={workspaceInfo}> | ||
<strong>Removed On:</strong> {formattedRemovedOnDate} | ||
</Text> | ||
</Section> | ||
<Text style={text}> | ||
If you believe this action was taken in error or have any | ||
questions regarding this change, please contact your project | ||
administrator or our support team. | ||
</Text> | ||
<Text style={text}> | ||
We appreciate your understanding and thank you for your | ||
contributions to the project. | ||
</Text> | ||
<Text style={text}> | ||
Cheers, | ||
<br /> | ||
Team Keyshade | ||
</Text> | ||
</Section> | ||
<Section style={footer}> | ||
<Text style={footerText}> | ||
This is an automated message. Please do not reply to this email. | ||
</Text> | ||
<Text style={footerText}> | ||
Read our{' '} | ||
<Link href="https://www.keyshade.xyz/privacy" style={link}> | ||
Privacy Policy | ||
</Link>{' '} | ||
and{' '} | ||
<Link | ||
href="https://www.keyshade.xyz/terms_and_condition" | ||
style={link} | ||
> | ||
Terms and Conditions | ||
</Link>{' '} | ||
for more information on how we manage your data and services. | ||
</Text> | ||
</Section> | ||
</Container> | ||
</Body> | ||
</Html> | ||
) | ||
} | ||
|
||
export default RemovedFromWorkspaceEmail | ||
|
||
const main = { | ||
fontFamily: "'Segoe UI', 'Roboto', sans-serif", | ||
lineHeight: '1.6', | ||
color: '#04050a', | ||
backgroundColor: '#fafafa', | ||
margin: '0', | ||
padding: '20px' | ||
} | ||
|
||
const container = { | ||
maxWidth: '600px', | ||
margin: '0 auto', | ||
backgroundColor: '#fff', | ||
borderRadius: '5px', | ||
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.05)' | ||
} | ||
|
||
const content = { | ||
padding: '20px 40px' | ||
} | ||
|
||
const h1 = { | ||
color: '#000', | ||
marginBottom: '20px', | ||
fontSize: '24px', | ||
fontWeight: '600' | ||
} | ||
|
||
const text = { | ||
marginBottom: '5px', | ||
color: '#666' | ||
} | ||
|
||
const workspaceDetails = { | ||
width: '100%', | ||
backgroundColor: '#fafafa', | ||
borderRadius: '5px', | ||
margin: '20px 0px', | ||
padding: '10px 20px' | ||
} | ||
|
||
const workspaceInfo = { | ||
margin: '7px 0px' | ||
} | ||
|
||
const footer = { | ||
borderTop: '1px solid #eaeaea', | ||
padding: '20px' | ||
} | ||
|
||
const footerText = { | ||
fontSize: '12px', | ||
color: '#999', | ||
textAlign: 'center' as const, | ||
margin: '0' | ||
} | ||
|
||
const link = { | ||
color: '#000', | ||
textDecoration: 'underline' | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"name": "eslint-config-custom", | ||
"license": "MIT", | ||
"version": "0.0.0", | ||
"private": true, | ||
"devDependencies": { | ||
"@vercel/style-guide": "^5.0.0", | ||
"eslint-config-turbo": "^2.3.1", | ||
"typescript": "^4.5.3" | ||
} | ||
"name": "eslint-config-custom", | ||
"license": "MIT", | ||
"version": "0.0.0", | ||
"private": true, | ||
"devDependencies": { | ||
"@vercel/style-guide": "^5.0.0", | ||
"eslint-config-turbo": "^2.3.1", | ||
"typescript": "^4.5.3" | ||
} | ||
} |
Oops, something went wrong.