forked from hackerwins/codepair-old
-
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
hyunwoo.jo
committed
Dec 1, 2020
1 parent
feb1c4c
commit 67fc31c
Showing
12 changed files
with
11,038 additions
and
8,389 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,3 @@ | ||
node_modules | ||
dist | ||
src/serviceWorker.ts |
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,9 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"extends": ["airbnb-typescript", "prettier", "plugin:@typescript-eslint/eslint-recommended"], | ||
"rules": {}, | ||
"plugins": ["@typescript-eslint"] | ||
} |
Large diffs are not rendered by default.
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
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 |
---|---|---|
|
@@ -2,7 +2,12 @@ import { ActionCreator, Dispatch } from 'redux'; | |
import { ThunkAction } from 'redux-thunk'; | ||
import yorkie, { Client, Document } from 'yorkie-js-sdk'; | ||
|
||
import { IDocState } from '../reducers/docReducer'; | ||
export interface IDocState { | ||
client: Client | null; | ||
doc: Document | null; | ||
loading: boolean; | ||
errorMessage: string; | ||
} | ||
This comment has been minimized.
Sorry, something went wrong.
ppeeou
Owner
|
||
|
||
export enum DocActionTypes { | ||
ATTACH_DOC = 'ATTACH_DOC', | ||
|
@@ -27,8 +32,8 @@ export interface IErrorAction { | |
} | ||
export type DocActions = AttachDocAction | ILoadDocAction | IErrorAction; | ||
|
||
/*<Promise<Return Type>, State Interface, Type of Param, Type of Action> */ | ||
export const AttachDocAction: ActionCreator<ThunkAction<Promise<any>, IDocState, null, AttachDocAction>> = ( | ||
/** <Promise<Return Type>, State Interface, Type of Param, Type of Action> */ | ||
export const AttachDoc: ActionCreator<ThunkAction<Promise<any>, IDocState, null, AttachDocAction>> = ( | ||
docKey: string, | ||
) => { | ||
return async (dispatch: Dispatch) => { | ||
|
@@ -48,6 +53,7 @@ export const AttachDocAction: ActionCreator<ThunkAction<Promise<any>, IDocState, | |
|
||
dispatch({ type: DocActionTypes.ATTACH_DOC, doc, client }); | ||
} catch (err) { | ||
// eslint-disable-next-line no-console | ||
console.error(err); | ||
dispatch({ type: DocActionTypes.ERROR, errorMessage: err.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
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
If the react-script version is low, the following issues exist.
ref typescript-eslint/typescript-eslint#2540