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 { h } from 'preact'; | |
import Link from 'react-router-dom/Link'; | |
import Route from 'react-router-dom/Route'; | |
import Switch from 'react-router-dom/Switch'; | |
import Home from '../routes/Home'; | |
import About from '../routes/About'; | |
const App = () => ( | |
<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
import { h, Component } from 'preact'; | |
export default class PersistGate extends Component { | |
unsubscribe; | |
state = { | |
isBootstrapped: false | |
}; | |
handlePersistorState = () => { |
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 { h, createElement } from 'preact' | |
import humps from 'humps' | |
import fontawesome from '@fortawesome/fontawesome' | |
// icons | |
import faClipboardList from '@fortawesome/fontawesome-pro-solid/faClipboardList' | |
import faPlus from '@fortawesome/fontawesome-pro-solid/faPlus' | |
fontawesome.library.add(faClipboardList, faPlus) | |
const Icon = props => { |
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 hoistNonReactStatic from "hoist-non-react-statics" | |
const withHOC = hocProps => WrappedComponent => { | |
// use `hocProps` to configure how the HOC behaves towards it's `WrappedComponent` | |
const { debug } = hocProps | |
if (debug) { | |
console.debug("withHoc is in DEBUG mode") | |
} |
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
/** | |
* 1.) Context. For lifting our state up to any tree below the Provider. | |
*/ | |
const ActivityContext = createContext() | |
/** | |
* 2.) Provider. For sharing our state across many render trees. | |
*/ | |
export const ActivityProvider = ({ children }) => { | |
const [activity, setActivity] = useState([]) |
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
/* ./styles/global.css */ | |
@import url('https://rsms.me/inter/inter.css'); | |
@tailwind base; | |
@tailwind components; | |
/* custom styles */ | |
@tailwind utilities; |
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 fetch = require("node-fetch"); | |
const FormData = require("form-data"); | |
const API_URL = process.env.SUPABASE_URL; | |
const AUTH_TOKEN = process.env.SUPABASE_KEY; | |
/** | |
* @async | |
* @param {string} bucketId | |
* @param {string} path |
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
/** | |
* 1.) Make sure you have the `GOOGLE_APPLICATION_CREDENTIALS` environment variable | |
* set to the path of your local service account credentials. | |
* @see https://cloud.google.com/storage/docs/reference/libraries#setting_up_authentication | |
* | |
* 2.) Make sure you have the `SUPABASE_URL` and `SUPABASE_KEY` environment variables set | |
* with the proper values from your Supabase Project API page. | |
* | |
* Install dependancies: `npm install --save node-fetch form-data @google-cloud/storage` | |
*/ |
OlderNewer