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
{ | |
"env": { | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"extends": [ | |
"airbnb-base", | |
"plugin:@typescript-eslint/recommended", | |
"prettier/@typescript-eslint", |
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
const aws = require('aws-sdk'); | |
const sharp = require('sharp'); | |
const crypto = require('crypto'); | |
import awsConfig from '../config/aws'; | |
interface Data { | |
createReadStream: any; | |
filename: string; | |
mimetype: string; |
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
import React, { useCallback } from 'react' | |
import PropTypes from 'prop-types' | |
import { useFormik } from 'formik' | |
import { useMutation } from '@apollo/react-hooks' | |
import { gql } from 'apollo-boost' | |
import { EditorState, convertToRaw } from 'draft-js' | |
import { Button, Typography } from '@material-ui/core' | |
import { useSnackbar } from '../../../../../lib/SnackbarContext' |
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
import React, { createContext, useCallback, useContext, useReducer } from 'react' | |
import PropType from 'prop-types' | |
import Snackbar from '../components/Snackbar' | |
export const SnackbarContext = createContext() | |
const initialState = { | |
open: false, | |
severity: '', |
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
import React, { createContext, useCallback, useContext, useState } from 'react'; | |
import { uuid } from 'uuidv4'; | |
import ToastContainer from '../components/ToastContainer'; | |
export interface ToastMessage { | |
id: string; | |
type?: 'success' | 'error' | 'info'; | |
title: string; | |
description?: string; |
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
import React, {useState, useRef} from 'react'; | |
import { | |
View, | |
WebView, | |
Text, | |
Linking, | |
Dimensions, | |
StyleSheet, | |
} from 'react-native'; |
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
import { createMuiTheme } from '@material-ui/core/styles' | |
export const theme = createMuiTheme({ | |
overrides: { | |
MuiButton: { | |
root: { | |
borderRadius: 8, | |
fontWeight: 'bold', | |
boxShadow: 'none' | |
} |
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
async findOneByEnrollment({ accountId, userId, courseId, courseVersionId, lessonId }) { | |
const [enrolment] = await this.knex('enrollments') | |
.where({ | |
user_id: userId | |
}) | |
.andWhere({ | |
account_id: accountId | |
}) | |
.andWhere({ | |
course_id: courseId |
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
import * as React from 'react'; | |
import styled from 'styled-components'; | |
import media from 'styled-media-query'; | |
import { Form, FormikProps } from 'formik'; | |
import LinearProgress from '@material-ui/core/LinearProgress'; | |
import CardContent from '@material-ui/core/CardContent'; | |
import CardActions from '@material-ui/core/CardActions'; | |
import Button from '@material-ui/core/Button'; | |
import addYears from 'date-fns/addYears'; |
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
import * as React from 'react'; | |
import * as ptBRLocale from 'date-fns/locale/pt-BR'; | |
import addYears from 'date-fns/addYears'; | |
import CurrencyInput from 'react-currency-input'; | |
import { | |
useForm, | |
Controller, | |
} from 'react-hook-form'; | |
import { |
NewerOlder