-
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
e0e9aeb
commit a934c1d
Showing
24 changed files
with
56 additions
and
463 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,13 +1,13 @@ | ||
import useLocalStorage from '@olerichter00/use-localstorage' | ||
|
||
export default function useFilter(): [boolean, Function] { | ||
const [filter, setFilter] = useLocalStorage('filter', false) | ||
const [filter, setFilter] = useLocalStorage<boolean>('filter', false) | ||
|
||
const switchFilter = () => { | ||
const newFilter = !filter | ||
|
||
setFilter(newFilter) | ||
} | ||
|
||
return [filter, switchFilter] | ||
return [filter as boolean, switchFilter] | ||
} |
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,17 @@ | ||
import pageMetaScraper from 'page-meta-scraper' | ||
import config from './config' | ||
|
||
const isDevEnvironment = !process.env.NODE_ENV || process.env.NODE_ENV === 'development' | ||
|
||
pageMetaScraper.configure({ | ||
useFallbackImages: false, | ||
imageFallbackStrategies: ['contextualweb', 'unsplash'], | ||
|
||
unsplashBaseUrl: config.unsplashBaseUrl, | ||
unsplashClientId: config.unsplashClientId, | ||
xRapidapiHost: config.xRapidapiHost, | ||
xRapidapiKey: config.xRapidapiKey, | ||
debugMode: isDevEnvironment ? true : false, | ||
}) | ||
|
||
export default pageMetaScraper |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.