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
| { | |
| "workbench.colorTheme": "One Dark Pro Vivid", | |
| "editor.fontFamily": "'Fantasque Sans Mono', Consolas, 'Courier New', monospace", | |
| "editor.suggestSelection": "first", | |
| "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
| "files.associations": { | |
| "*.html": "html", | |
| "*.js": "javascriptreact", | |
| "*.jsx": "javascriptreact" | |
| }, |
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 {STARTING_UPLOAD, SUCCESS_UPLOAD, ERROR_UPLOAD} from './actions'; | |
| let INITIAL_STATE = { | |
| starting: false, | |
| success: false, | |
| url: null, | |
| error: null | |
| }; | |
| export let uploadReducer = (state = INITIAL_STATE, action) => { |
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 axios from 'axios'; | |
| import shortid from 'shortid'; | |
| export const STARTING_UPLOAD = 'STARTING_UPLOAD'; | |
| export const SUCCESS_UPLOAD = 'SUCCESS_UPLOAD'; | |
| export const ERROR_UPLOAD = 'ERROR_UPLOAD'; | |
| export const startingUpload = () => { | |
| return { | |
| type: STARTING_UPLOAD |
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, { useRef } from 'react'; | |
| import { uploadFileThunk } from '../../../store/upload/actions'; | |
| import { useDispatch, useSelector } from 'react-redux'; | |
| const ComponentName = () => { | |
| const uploadInput = useRef(); | |
| const dispatch = useDispatch(); | |
| const upload = useSelector(state => state.upload) |
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
| require('dotenv').config() | |
| var aws = require('aws-sdk'); | |
| aws.config.update({ | |
| region: 'us-east-1', | |
| accessKeyId: process.env.AWSAccessKeyId, | |
| secretAccessKey: process.env.AWSSecretKey | |
| }) | |
| const S3_BUCKET = process.env.bucket |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
| <CORSRule> | |
| <AllowedOrigin>*</AllowedOrigin> | |
| <AllowedMethod>GET</AllowedMethod> | |
| <AllowedMethod>POST</AllowedMethod> | |
| <AllowedMethod>PUT</AllowedMethod> | |
| <AllowedHeader>*</AllowedHeader> | |
| </CORSRule> | |
| </CORSConfiguration> |
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
| var aws = require('aws-sdk'); | |
| aws.config.update({ | |
| region: 'us-east-1', | |
| accessKeyId: process.env.AWSAccessKeyId, | |
| secretAccessKey: process.env.AWSSecretKey | |
| }) | |
| const S3_BUCKET = process.env.bucket |
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 { Link } from "react-router-dom"; | |
| interface useLinkComponentProps{ | |
| url: string, | |
| } | |
| const useLinkComponent: React.SFC<useLinkComponentProps> = ({url, children, ...rest}) => { | |
| return ( | |
| <Link to={url} {...rest}> |
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
| npm i -g node-sass | |
| node-sass --watch ./ -o ./ |
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
| .containerFlexVertical{ | |
| display: flex; | |
| flex-direction: column; | |
| flex-wrap: wrap; | |
| } | |
| .containerFlexHorizontal{ | |
| display: flex; | |
| flex-direction: row; | |
| flex-wrap: wrap; |