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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>busuu - Front-end Interview - HTML & CSS</title> | |
<style> | |
/* | |
* Colors used: |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>busuu - Front-end Interview - HTML & CSS</title> | |
<style> | |
/* | |
* Colors used: |
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 LoadComponent from './LoadableComponent.jsx'; | |
const HomeComponent = LoadComponent('HomeComponent'); | |
const App = () => { | |
return ( | |
<HomeComponent /> | |
); | |
}; | |
export default App; |
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, { PureComponent, Fragment } from 'react'; | |
class LoadableErrorBoundary extends PureComponent { | |
constructor() { | |
super(); | |
this.state = { | |
hasError: false, | |
error: null | |
}; | |
this.retryLoad = this.retryLoad.bind(this); |
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, { PureComponent, Suspense, Fragment, lazy } from 'react'; | |
import LoadableErrorBoundary from './LoadableErrorBoundary.jsx'; | |
import LoadableConstants from './loadable.constants.js'; | |
// Private vars | |
const filename = 'LoadableComponent.jsx'; | |
/** | |
* Our render for any loading state - maybe add a nice spinner? | |
* (Visible whilst the component is being fetched) |
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, { PureComponent, Suspense, Fragment, lazy } from 'react'; | |
import LoadableErrorBoundary from './LoadableErrorBoundary.jsx'; | |
import LoadableConstants from './loadable.constants.js'; | |
// Private vars | |
const filename = 'LoadableComponent.jsx'; | |
/** | |
* Our render for any loading state - maybe add a nice spinner? | |
* (Visible whilst the component is being fetched) | |
*/ | |
const loadingState = ( |
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
export default { | |
HomeComponent: () => import(/* webpackChunkName: 'home/HomeComponent' */ './HomeComponent.jsx'), | |
AboutComponent: () => import(/* webpackChunkName: 'about/AboutComponent' */ './AboutComponent.jsx'), | |
SettingsComponent: () => import(/* webpackChunkName: 'settings/SettingsComponent' */ './SettingsComponent.jsx') | |
}; |
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 getStartOfWeek = (date) => { | |
const diff = date.getDate() - date.getDay(); | |
const startOfWeekDate = new Date(date.setDate(diff)); | |
return startOfWeekDate.toISOString().slice(0, 10); | |
}; | |
const getWeekNumber = (fromDate) => { | |
const now = new Date(); | |
const activationDate = new Date(fromDate); | |
const startOfWeekFromNow = getStartOfWeek(now); |
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
{ | |
"binary_file_patterns": | |
[ | |
".svn/", | |
".git/", | |
".hg/", | |
"CVS/", | |
"node_modules/", | |
"bower_components/" | |
], |
NewerOlder