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 { Request, Response } from 'express'; | |
import { container } from 'tsyringe'; | |
import { classToClass } from 'class-transformer'; | |
import CreateUserService from '@modules/users/services/CreateUserService'; | |
export default class UsersController { | |
public async create(request: Request, response: Response): Promise<Response> { | |
const { name, email, password } = request.body; |
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 React from 'react'; | |
import { | |
Container, | |
Text, | |
Card, | |
BorderTopLeft, | |
BorderTopRight, | |
BorderBottomLeft, | |
BorderBottomRight, |
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 React from 'react'; | |
import { createStackNavigator } from '@react-navigation/stack'; | |
import { useAuth } from '../hooks/auth'; | |
import AuthRoutes from './auth.routes'; | |
import AppRoutes from './app.routes'; | |
const Stack = createStackNavigator(); | |
const Routes: React.FC = () => { |
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 { Link as ChakraLink } from '@chakra-ui/react'; | |
import React, { cloneElement, ReactElement } from 'react'; | |
import { useLocation } from 'react-router'; | |
import { Link, LinkProps } from 'react-router-dom'; | |
interface IActiveLinkProps extends LinkProps { | |
children: ReactElement; | |
shouldMatchExactHref?: boolean; | |
} |
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 { | |
FormLabel, | |
FormControl, | |
FormErrorMessage, | |
useTheme, | |
} from '@chakra-ui/react'; | |
import { Control, Controller, FieldError } from 'react-hook-form'; | |
import { OptionTypeBase, StylesConfig } from 'react-select'; | |
import ReactAsyncSelect, { AsyncProps } from 'react-select/async'; |
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 { | |
FormLabel, | |
FormControl, | |
FormErrorMessage, | |
useTheme, | |
} from '@chakra-ui/react'; | |
import { Control, Controller, FieldError } from 'react-hook-form'; | |
import Select, { | |
OptionTypeBase, | |
Props as SelectProps, |
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 { | |
FormLabel, | |
FormControl, | |
FormErrorMessage, | |
useTheme, | |
} from '@chakra-ui/react'; | |
import { Control, Controller, FieldError } from 'react-hook-form'; | |
import { OptionTypeBase, StylesConfig } from 'react-select'; | |
import ReactAsyncSelect, { AsyncProps } from 'react-select/async'; |
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 { MigrationInterface, QueryRunner, TableColumn } from 'typeorm'; | |
export default class AlterDateToDateTime1631573747885 | |
implements MigrationInterface | |
{ | |
public async up(queryRunner: QueryRunner): Promise<void> { | |
await queryRunner.changeColumn( | |
'leads', | |
'createdAt', | |
new TableColumn({ |
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
//src/hooks/auth.tsx | |
import React, { | |
useEffect, | |
createContext, | |
useCallback, | |
useState, | |
useContext, | |
} from 'react'; | |
import AsyncStorage from '@react-native-community/async-storage'; |