-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0660277
commit 1062c94
Showing
17 changed files
with
386 additions
and
65 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import axios from 'axios'; | ||
|
||
const API_KEY = 'AIzaSyD6-G_GH5O5QT_f8oeDHZjSybzThcBXPJo'; | ||
// const API_KEY_SECONDARY = 'AIzaSyDTP6O2vSfH2gF3976Y9SRkIHAtoApipz8'; | ||
// const API_KEY = 'AIzaSyD6-G_GH5O5QT_f8oeDHZjSybzThcBXPJo'; | ||
const API_KEY_SECONDARY = 'AIzaSyDTP6O2vSfH2gF3976Y9SRkIHAtoApipz8'; | ||
// const API_KEY_THIRD = 'AIzaSyCasS9wwE-zCFuE-thapTMKUYb7tJjCbPs'; | ||
|
||
export default axios.create({ | ||
baseURL: 'https://www.googleapis.com/youtube/v3', | ||
params: { | ||
key: API_KEY | ||
key: API_KEY_SECONDARY | ||
} | ||
}) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.line-loader { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
height: 2px; | ||
background-color: red; | ||
z-index: 99999; | ||
animation: lineLoader 4s ease-in; | ||
} | ||
|
||
@keyframes lineLoader { | ||
0% { | ||
width: 20%; | ||
} | ||
40% { | ||
width: 40%; | ||
} | ||
80% { | ||
width: 80%; | ||
} | ||
100% { | ||
width: 100%; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import './LineLoader.css'; | ||
import React, { useRef, useEffect } from 'react'; | ||
import { connect } from 'react-redux' | ||
|
||
const LineLoader = ({ isFetchingData }) => { | ||
const ref = useRef(); | ||
|
||
useEffect(() => { | ||
let timeoutId = 0; | ||
|
||
if(ref.current && isFetchingData) { | ||
ref.current.style.display = 'block'; | ||
ref.current.style.animationDuration = '20s'; | ||
} | ||
|
||
if(ref.current && !isFetchingData) { | ||
ref.current.style.animationDuration = '1.2s'; | ||
timeoutId = setTimeout(() => { | ||
ref.current.style.display = 'none'; | ||
}, 2000); | ||
} | ||
|
||
return () => clearTimeout(timeoutId); | ||
}, [isFetchingData]) | ||
|
||
return <div ref={ref} className="line-loader"></div>; | ||
} | ||
|
||
const mapStateToProps = state => ({ isFetchingData: state.isFetchingData }); | ||
|
||
export default connect(mapStateToProps)(LineLoader) |
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
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
Oops, something went wrong.
1062c94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: