This file contains hidden or 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
| const users = [ | |
| { | |
| id: 1, | |
| username: "supercoder", | |
| }, | |
| { | |
| id: 2, | |
| username: "xXxSniperElitexXx", | |
| }, | |
| { |
This file contains hidden or 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
| import { useCallback, useState } from "react"; | |
| import { StyleSheet, Text, View } from "react-native"; | |
| import Modal from "react-native-modal"; | |
| export default function App() { | |
| const [visible, setVisible] = useState(false); | |
| const showModal = useCallback(() => setVisible(true), []); | |
| const hideModal = useCallback(() => setVisible(false), []); | |
| return ( |
This file contains hidden or 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
| import { useCallback, useState } from "react"; | |
| import { StyleSheet, Text, View } from "react-native"; | |
| import Modal from "react-native-modal"; | |
| export default function App() { | |
| const [visible, setVisible] = useState(false); | |
| const showModal = useCallback(() => setVisible(true), []); | |
| const hideModal = useCallback(() => setVisible(false), []); | |
| return ( |
This file contains hidden or 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
| import { useCallback, useState } from "react"; | |
| import { StyleSheet, Text, View, Modal as RNM } from "react-native"; | |
| import Modal from "react-native-modal"; | |
| export default function App() { | |
| const [visible, setVisible] = useState(false); | |
| const showModal = useCallback(() => setVisible(true), []); | |
| const hideModal = useCallback(() => setVisible(false), []); | |
| return ( |
This file contains hidden or 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
| import { useCallback, useState } from "react"; | |
| import { StyleSheet, Text, View, ScrollView } from "react-native"; | |
| import Modal from "react-native-modal"; | |
| export default function App() { | |
| const [visible, setVisible] = useState(false); | |
| const showModal = useCallback(() => setVisible(true), []); | |
| const hideModal = useCallback(() => setVisible(false), []); | |
| return ( |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
| <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> | |
| <title>Hello World</title> | |
| </head> |
This file contains hidden or 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
| version: '3' | |
| services: | |
| mailcatcher: | |
| image: 'schickling/mailcatcher' | |
| ports: | |
| - '7001:1080' # UI | |
| - '7002:1025' # SMTP | |
| redis: | |
| image: 'redis' | |
| ports: |
This file contains hidden or 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
| import { Body, Controller, Post } from '@nestjs/common'; | |
| import { AppService } from './app.service'; | |
| import { CommentDTO } from './comment.interfaces'; | |
| @Controller() | |
| export class AppController { | |
| constructor(private readonly appService: AppService) {} | |
| @Post() | |
| addComment(@Body() data: CommentDTO) { |
This file contains hidden or 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
| import * as React from 'react'; | |
| import { Injectable } from '@nestjs/common'; | |
| import { | |
| render, | |
| MjmlBody, | |
| Mjml, | |
| MjmlHead, | |
| MjmlFont, | |
| MjmlPreview, | |
| MjmlSection, |
This file contains hidden or 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
| import { Process, Processor } from '@nestjs/bull'; | |
| import { Job } from 'bull'; | |
| import { EmailService, SendEmailData } from './email.service'; | |
| // We create an intermediary type EmailJob in case our EmailProcessor | |
| // needs more information than the actual e-mail service. | |
| // Just a level of indirection for now. | |
| export type EmailJob = SendEmailData; | |
| export const createEmailJob = (data: EmailJob): EmailJob => data; |