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 from 'react'; | |
import SlideOnLoad from '../PathToSlideOnLoad; | |
//wrap your component inside the SlideOnLoad component to see the effect on load | |
//SlideOnLoad props: | |
//direction: enum string<= options: 'up', 'down','left','right','custom' | |
//end:string in pixels e.g. 20px, //required | |
//start:string in pixels e.g. 20px, //optional, only required for when direction is custom | |
const Example=()=>{ | |
return( |
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 from 'react'; | |
import Typing from '../PathToTyping'; | |
//Typing props: | |
//label: array of strings | |
//showCursor:boolean <= shows cursor blinking effect when typing is completed | |
//cb: function <= callback function that triggers when typing is completed | |
const Example=()=>{ | |
return( | |
<div style={{ width: '200px' }}> |
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 { useState, useLayoutEffect } from 'react' | |
function useWindowSize() { | |
const [size, setSize] = useState([0, 0]); | |
useLayoutEffect(() => { | |
updateSize()=> { | |
setSize([window.innerWidth, window.innerHeight, window.pageYOffset]); | |
} | |
window.addEventListener('resize', updateSize); | |
updateSize(); |
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
//THE CONTENT IN THIS FILE WILL BE USED TO RENDER THE PROJECTS IN THE PROJECT SECTION ALONG WITH THE PROJECT DATA ITSELF | |
import SearchBar from '../ProjectComponents/SearchBar' | |
// the key used for the property should be the same used as the last part in the url, | |
//INCORRECT SETUP: | |
// 'brands-api':{ | |
// url:'/projects/brandsApi', <====INCORRECT SETUP | |
// ... more keys here | |
// } |
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 from 'react'; | |
import MovingLabel from '../PathToMovingLabel'; | |
// Moving Label props: | |
// message: component, | |
// follow: boolean => if true, component will move around the div, if false, it will only move around its axis | |
// angle: angle of rotation | |
const Example=()=>{ | |
return( |
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 from 'react'; | |
import MovingLabel from '../PathToMovingLabel'; | |
//Moving Label props: | |
// message: component, | |
// follow: boolean => if true, component will move around the div, if false, it will only move around its axis | |
const Example=()=>{ | |
return( | |
<div style={{ height: '500px', width: '100%', boxShadow: '-1px 2px 4px -2px', borderRadius: '10px', margin: '10px', display: 'flex', justifyContent: 'center' }}> |
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 from 'react'; | |
import MagneticMouse from '../PathToMagneticMouse'; | |
//MagneticMouse also accepts a img props which is the url of an image | |
const Example=()=>{ | |
return( | |
<div style={{ height: '500px', width: '100%', boxShadow: '-1px 2px 4px -2px', borderRadius: '10px', margin: '10px', display: 'flex', justifyContent: 'center' }}> | |
<MagneticMouse myBackground={'Hi this is a sample message'} /> | |
</div> |
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 jwt = require('jsonwebtoken'); | |
const User = require('mongoose').model('User'); | |
const Task = require('mongoose').model('Task'); | |
const config = require('../../config'); | |
/** | |
* The Auth Checker middleware function. | |
*/ | |
module.exports = (req, res, next) => { |
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 from 'react'; | |
import Auth from '../../modules/Auth'; | |
import Dashboard from '../../components/Dashboard'; | |
import SideBar from '../../components/SideBar'; | |
import TopBar from '../../components/TopBar'; | |
class DashboardPage extends React.Component { | |
constructor(props) { | |
super(props); |