-
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.
Merge branch 'dev' into feature/make-3dots-leader
- Loading branch information
Showing
21 changed files
with
1,583 additions
and
1,086 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,26 @@ | ||
name: Send Bluesky Post | ||
|
||
on: | ||
release: | ||
types: [published] | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
post: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: get latest release | ||
id: get_latest_release | ||
run: | | ||
echo ::set-output name=tag::$(git describe --tags --abbrev=0) | ||
- name: Send Bluesky Post | ||
uses: myConsciousness/bluesky-post@v5 | ||
with: | ||
text: "[VocabPhrase](https://vocab-phrase.vercel.app)の${{ steps.get_latest_release.outputs.tag }}が公開されました。 詳細は [こちら](${{ github.event.release.html_url }})" | ||
link-preview-url: "https://vocab-phrase.vercel.app" | ||
identifier: ${{ secrets.BLUESKY_IDENTIFIER }} | ||
password: ${{ secrets.BLUESKY_PASSWORD }} |
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,16 +1,10 @@ | ||
export type flashCardSettings = | ||
| { | ||
isRandom: boolean; | ||
isAnswerWithKeyboard: false; | ||
removeChecked?: boolean; | ||
questionCount?: number; | ||
mode: flashCardMode; | ||
} | ||
| { | ||
isRandom: boolean; | ||
isAnswerWithKeyboard: true; | ||
removeChecked: boolean; | ||
questionCount?: number; | ||
mode: "ja-en"; | ||
}; | ||
export type flashCardSettings = { | ||
[keyof: string]: any; | ||
isRandom: boolean; | ||
isAnswerWithKeyboard: boolean; | ||
removeChecked?: boolean; | ||
questionCount?: number; | ||
mode: flashCardMode; | ||
}; | ||
|
||
export type flashCardMode = "ja-en" | "en-ja"; |
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,14 @@ | ||
import { localSettings } from "@/@types/settings"; | ||
import { atom } from "recoil"; | ||
import { recoilPersist } from "recoil-persist"; | ||
|
||
// recoil | ||
const { persistAtom } = recoilPersist({ | ||
key: "settings", | ||
storage: typeof window === "undefined" ? undefined : localStorage, | ||
}); | ||
export const localSettingsState = atom<localSettings>({ | ||
key: "settings", | ||
default: {}, | ||
effects_UNSTABLE: [persistAtom], | ||
}); |
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,24 @@ | ||
import { useEffect } from "react"; | ||
import Router from "next/router"; | ||
import { useBeforeUnload } from "react-use"; | ||
|
||
export const useLeavePageConfirmation = ( | ||
showAlert = true, | ||
message?: string | ||
) => { | ||
useBeforeUnload(showAlert, message); | ||
|
||
useEffect(() => { | ||
const handler = () => { | ||
if (showAlert && !window.confirm(message)) { | ||
throw "cancel"; | ||
} | ||
}; | ||
|
||
Router.events.on("routeChangeStart", handler); | ||
|
||
return () => { | ||
Router.events.off("routeChangeStart", handler); | ||
}; | ||
}, [showAlert, message]); | ||
}; |
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
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.