-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace sharing from clipboard to share API
- Loading branch information
1 parent
e822c40
commit 86cb378
Showing
16 changed files
with
115 additions
and
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid" | ||
} |
This file was deleted.
Oops, something went wrong.
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,3 +1,3 @@ | ||
import airtable from './providers/airtable.js'; | ||
import quotable from './providers/quotable'; | ||
|
||
export default {airtable}; | ||
export default {quotable}; |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
import {generateQueryStrFromObject, processFetchRequest} from '../../utils'; | ||
|
||
const QUOTABLE_BASE_URL = 'https://quotable.io'; | ||
|
||
/** | ||
* Get list of quotes | ||
* @param {object=} params query params as object | ||
* @returns json response | ||
*/ | ||
const getQuotes = async function (params) { | ||
let url = `${QUOTABLE_BASE_URL}/quotes`; | ||
if (params) { | ||
url += generateQueryStrFromObject(params); | ||
} | ||
|
||
return processFetchRequest(url); | ||
}; | ||
|
||
export default { | ||
getQuotes, | ||
// other methods 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
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,5 @@ | ||
/** | ||
* Components that can be used anywhere in the project | ||
*/ | ||
|
||
export {default as Caraousel} from './Caraousel/Caraousel'; |
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,3 @@ | ||
/** | ||
* UI Elements goes 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Returns query string from object | ||
* @param {{ [param: string]: string|number|boolean }} obj query params as object | ||
* @example generateQueryStrFromObject({"q":"any","page":1}) returns "?q=any&page=1" | ||
*/ | ||
const generateQueryStrFromObject = obj => | ||
Object.keys(obj) | ||
.map((key, idx) => { | ||
if (idx === 0) { | ||
return `?${key}=${obj[key]}`; | ||
} | ||
return `&${key}=${obj[key]}`; | ||
}) | ||
.join(''); | ||
|
||
export default generateQueryStrFromObject; |
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,6 @@ | ||
/** | ||
* Utlities to be used anywhere in the project | ||
*/ | ||
|
||
export {default as generateQueryStrFromObject} from './generateQueryStrFromObject'; | ||
export {default as processFetchRequest} from './processFetchRequest'; |
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 +1,5 @@ | ||
/** | ||
* All App Screens are Exported here | ||
*/ | ||
|
||
export {default as HomeScreen} from './Home/HomeScreen'; |
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