Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Supported offline #115

Merged
merged 3 commits into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module 'redux-offline'
declare module 'redux-offline/lib/defaults'
declare module 'redux-offline-immutable-config'
112 changes: 101 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"dependencies": {
"@material-ui/core": "^3.6.1",
"@material-ui/icons": "^3.0.1",
"@redux-offline/redux-offline": "^2.5.1",
"@types/ramda": "^0.25.42",
"@types/react-helmet": "^5.0.7",
"@types/redux-devtools": "^3.0.44",
Expand Down Expand Up @@ -71,6 +72,8 @@
"redux": "4.0.1",
"redux-actions": "^2.6.4",
"redux-immutable": "4.0.0",
"redux-offline": "^2.0.0",
"redux-offline-immutable-config": "^1.0.0",
"redux-saga": "^0.16.2",
"redux-thunk": "^2.3.0",
"reflect-metadata": "^0.1.12",
Expand Down
6 changes: 3 additions & 3 deletions src/components/comment/CommentComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ export class CommentComponent extends Component<ICommentComponentProps, IComment
className={classes.textField}
fullWidth={true}
/> : <div className={classNames('animate2-top10', classes.commentBody)}>{

<Linkify properties={{ target: '_blank', style: { color: 'blue' } }}>
{reactStringReplace(this.state.text, /#(\w+)/g, (match: string, i: string) => (
{reactStringReplace(this.state.text, /#(\w+)/g, (match: string, i: number) => (
<NavLink
style={{ color: 'green' }}
key={match + i}
Expand All @@ -391,7 +391,7 @@ export class CommentComponent extends Component<ICommentComponentProps, IComment
}}
>
#{match}

</NavLink>

))}
Expand Down
34 changes: 17 additions & 17 deletions src/components/post/PostComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,15 @@ export class PostComponent extends Component<IPostComponentProps, IPostComponent
</div>
)

const {
ownerUserId,
ownerDisplayName,
creationDate,
image,
body,
id,
disableComments,
commentCounter,
const {
ownerUserId,
ownerDisplayName,
creationDate,
image,
body,
id,
disableComments,
commentCounter,
disableSharing ,
} = post.toJS() as any
// Define variables
Expand All @@ -412,7 +412,7 @@ export class PostComponent extends Component<IPostComponentProps, IPostComponent

<CardContent className={classes.postBody}>
<Linkify properties={{ target: '_blank', style: { color: 'blue' } }}>
{reactStringReplace(body, /#(\w+)/g, (match: string, i: string) => (
{reactStringReplace(body, /#(\w+)/g, (match: string, i: number) => (
<NavLink
style={{ color: 'green' }}
key={match + i}
Expand All @@ -424,7 +424,7 @@ export class PostComponent extends Component<IPostComponentProps, IPostComponent
}}
>
#{match}

</NavLink>

))}
Expand Down Expand Up @@ -465,15 +465,15 @@ export class PostComponent extends Component<IPostComponentProps, IPostComponent

<CommentGroup open={this.state.openComments} comments={commentList} ownerPostUserId={ownerUserId!} onToggleRequest={this.handleOpenComments} isPostOwner={this.props.isPostOwner!} disableComments={disableComments!} postId={id} />

<ShareDialog
onClose={this.handleCloseShare}
shareOpen={this.state.shareOpen}
onCopyLink={this.handleCopyLink}
<ShareDialog
onClose={this.handleCloseShare}
shareOpen={this.state.shareOpen}
onCopyLink={this.handleCopyLink}
openCopyLink={this.state.openCopyLink}
post={post}
post={post}

/>

<PostWrite
open={this.state.openPostWrite}
onRequestClose={this.handleClosePostWrite}
Expand Down
15 changes: 8 additions & 7 deletions src/config/environment.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import { LanguageType } from 'store/reducers/locale/langugeType'

export const environment = {
firebase: {
ipragmatechadmin marked this conversation as resolved.
Show resolved Hide resolved
apiKey: 'AIzaSyAHOZ7rWGDODCwJMB3WIt63CAIa90qI-jg',
authDomain: 'test-4515a.firebaseapp.com',
databaseURL: 'https://test-4515a.firebaseio.com',
projectId: 'test-4515a',
storageBucket: 'test-4515a.appspot.com',
messagingSenderId: '964743099489'
apiKey: 'AIzaSyDzFdZteXViq65uzFp4sAmesXk43uW_VfU',
authDomain: 'react-social-86ea9.firebaseapp.com',
databaseURL: 'https://react-social-86ea9.firebaseio.com',
projectId: 'react-social-86ea9',
storageBucket: 'react-social-86ea9.appspot.com',
messagingSenderId: '760013286552',
appId: '1:760013286552:web:4c9d52d1a2e0b824'
},
settings: {
enabledOAuthLogin: true,
enabledOAuthLogin: false,
appName: 'Green',
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
defaultLanguage: LanguageType.English
Expand Down
Loading