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 {useAppSelector, useAppDispatch} from "hooks" | |
import {selectNotes, removeNote} from "slice" | |
const HomePage = (): JSX.Element => { | |
const notes = useAppSelector(selectNotes); | |
const dispatch = useAppDispatch(); | |
const deleteNote = (noteId: string) => { | |
dispatch(removeNote(noteId)) | |
} |
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 { configureStore } from "@reduxjs/toolkit" | |
import noteReducer from "slice" | |
export const store = configureStore({ | |
reducer: { | |
notes: noteReducer | |
} | |
}) | |
export type RootState = ReturnType<typeof store.getState> |
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 {TypedUseSelectorHook, useDispatch, useSelector} from "react-redux" | |
import type {RootState, AppDispatch} from "store" | |
// use throughout your app instead of useDispatch and useSelector | |
export const useAppDispatch: () => AppDispatch = useDispatch | |
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector |
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 { configureStore } from "@reduxjs/toolkit" | |
export const store = configureStore({ | |
reducer: { | |
// reference reducers here | |
} | |
}) | |
// create types for state and dispatch | |
export type RootState = ReturnType<typeof store.getState> |
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
{ | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"printWidth": 80, | |
"tabWidth": 2, | |
"singleQuote": true, | |
"arrowParens": "always" | |
} |
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
"scripts": { | |
"bump-patch": "npm version patch --no-git-tag-version && bundle exec fastlane bump", | |
"bump-minor": "npm version minor --no-git-tag-version && bundle exec fastlane bump", | |
"bump-major": "npm version major --no-git-tag-version && bundle exec fastlane bump" | |
} |
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
- name: Decrypting | |
run: sh ./.github/scripts/decrypt.sh | |
env: | |
KEYS_KEYSTORE_PASSPHRASE: ${{secrets.KEYS_KEYSTORE_PASSPHRASE}} | |
- name: Make fastlane/keys.properties executable | |
run: | | |
chmod +x fastlane/keys.properties | |
- name: Dump fastlane/keys.properties into .env file | |
run: | | |
cat fastlane/keys.properties > fastlane/.env |
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
jobs: | |
build-production: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Repository in Github VM | |
uses: actions/checkout@v2 | |
- name: Run Node in Github VM | |
uses: actions/setup-node@master | |
- name: Install Dependencies |
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
#!/bin/sh | |
# Decrypt the file | |
# --batch to prevent interactive command | |
# --yes to assume "yes" for questions | |
gpg --quiet --batch --yes --decrypt --passphrase="$KEYS_KEYSTORE_PASSPHRASE" \ | |
--output android/app/release-key.keystore android/app/release-key.keystore.gpg | |
gpg --quiet --batch --yes --decrypt --passphrase="$KEYS_KEYSTORE_PASSPHRASE" \ |
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
name: Deploy To Firebase App Distribution And Bump Tag Version | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build-production: | |
runs-on: macos-latest |
NewerOlder