Skip to content

Instantly share code, notes, and snippets.

View gcmatheusj's full-sized avatar
Working in awesome projects

Matheus Castro gcmatheusj

Working in awesome projects
View GitHub Profile
"use client"
import * as React from "react"
import * as TabsPrimitive from "@radix-ui/react-tabs"
import { cn } from "@/lib/utils"
const Tabs = TabsPrimitive.Root
const TabsList = React.forwardRef<
"use client"
import * as React from "react"
import * as SelectPrimitive from "@radix-ui/react-select"
import { Check, ChevronDown, ChevronUp } from "lucide-react"
import { cn } from "@/lib/utils"
const Select = SelectPrimitive.Root
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
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;
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'
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: '',
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;
import React, {useState, useRef} from 'react';
import {
View,
WebView,
Text,
Linking,
Dimensions,
StyleSheet,
} from 'react-native';
import { createMuiTheme } from '@material-ui/core/styles'
export const theme = createMuiTheme({
overrides: {
MuiButton: {
root: {
borderRadius: 8,
fontWeight: 'bold',
boxShadow: 'none'
}
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