generated from Bside-Team-Four/nextjs-starter
-
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.
Merge pull request #117 from Bside-Team-Four/fix/114
Fix/114
- Loading branch information
Showing
15 changed files
with
112 additions
and
15 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
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ export default function Setting() { | |
<GrayBar /> | ||
<SettingItem | ||
title="문의" | ||
message="[email protected]" | ||
message="[email protected]" | ||
/> | ||
<SettingItem | ||
title="이용약관" | ||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { useRecoilState } from 'recoil'; | ||
|
||
import outOfRewordState from '@/store/out-of-reword'; | ||
|
||
const useOutOfReword = () => { | ||
const [outOfReword, setOutOfReword] = useRecoilState(outOfRewordState); | ||
|
||
return { | ||
outOfReword, | ||
setOutOfReword, | ||
}; | ||
}; | ||
|
||
export default useOutOfReword; |
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { atom } from 'recoil'; | ||
|
||
const outOfRewordState = atom<boolean>({ | ||
key: 'outOfRewordState', | ||
default: false, | ||
}); | ||
|
||
export default outOfRewordState; |
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,32 @@ | ||
export default class PoPoNativeBridge { | ||
private popoProtocol = typeof window === 'undefined' ? { | ||
postMessage: () => {}, | ||
resolve: () => {}, | ||
reject: () => {}, | ||
} : window.popoProtocol; | ||
|
||
private call({ action }:{ action: string }) { | ||
this.popoProtocol.postMessage(JSON.stringify({ action })); | ||
} | ||
|
||
private withResultCall<T>({ action }: { action: string; }): Promise<T> { | ||
return new Promise<T>((resolve, reject) => { | ||
this.popoProtocol.resolve = (result: T) => { | ||
resolve(result); | ||
}; | ||
this.popoProtocol.reject = (result: Error) => { | ||
reject(result); | ||
}; | ||
this.call({ action }); | ||
}); | ||
} | ||
|
||
async getFcmToken() { | ||
return ( | ||
this.withResultCall<string | undefined>({ | ||
action: 'getPushToken', | ||
})); | ||
} | ||
} | ||
|
||
export const nativeBridge = new PoPoNativeBridge(); |