Skip to content

Commit

Permalink
feat(1149): Implemented pouchdb operations with the ui
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilmhdh committed Jul 26, 2021
1 parent f8c1cf3 commit de7355c
Show file tree
Hide file tree
Showing 52 changed files with 2,840 additions and 268 deletions.
744 changes: 744 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "idea-hub",
"version": "0.1.0",
"private": true,
"homepage": "/ideas",
"author": {
"name": "Akhil Mohan",
"email": "[email protected]",
"url": "https://github.com/akhilmhdh"
},
"dependencies": {
"@hookform/resolvers": "^2.6.0",
"@patternfly/react-core": "^4.128.2",
"@patternfly/react-icons": "^4.10.11",
"@patternfly/react-styles": "^4.10.11",
Expand All @@ -19,16 +21,22 @@
"@types/react": "^17.0.11",
"@types/react-dom": "^17.0.7",
"history": "^5.0.0",
"nanoid": "^3.1.23",
"node-sass": "^6.0.1",
"pouchdb": "^7.2.2",
"pouchdb-debug": "^7.2.1",
"pouchdb-find": "^7.2.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.10.1",
"react-router-dom": "^6.0.0-beta.0",
"react-scripts": "4.0.3",
"typescript": "^4.3.2",
"web-vitals": "^2.0.1"
"web-vitals": "^2.0.1",
"yup": "^0.32.9"
},
"scripts": {
"start": "react-scripts start",
"start": "PORT=5500 react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
Expand Down Expand Up @@ -58,6 +66,7 @@
]
},
"devDependencies": {
"@types/pouchdb": "^6.4.0",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^4.26.1",
"@typescript-eslint/parser": "^4.26.1",
Expand Down
File renamed without changes
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<base href="%PUBLIC_URL%/">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description"
Expand Down
15 changes: 14 additions & 1 deletion src/App.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@import '@patternfly/react-styles/css/utilities/Spacing/spacing.css',
'@patternfly/react-styles/css/utilities/Text/text.css',
'@patternfly/react-styles/css/utilities/Alignment/alignment.css',
'@patternfly/react-styles/css/utilities/Sizing/sizing.css';
'@patternfly/react-styles/css/utilities/Sizing/sizing.css',
'@patternfly/react-styles/css/utilities/Display/display.css';

html,
body,
Expand All @@ -11,6 +12,10 @@ body,
margin: 0;
}

#root {
height: inherit;
}

.pf-c-breadcrumb__link {
--pf-c-breadcrumb__link--Color: 'unset';
}
Expand Down Expand Up @@ -68,6 +73,14 @@ a {
padding: 4px 12px;
}

.pf-c-backdrop {
--pf-c-backdrop--ZIndex: 9999;
}

.rounded {
border-radius: 8px;
}

.capitalize {
text-transform: capitalize;
}
9 changes: 6 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { BrowserRouter } from 'react-router-dom';

import { PouchDBProvider } from 'context';
import { Router } from './routes';
import './App.scss';

const App = (): JSX.Element => {
return (
<BrowserRouter>
<Router />
</BrowserRouter>
<PouchDBProvider>
<BrowserRouter>
<Router />
</BrowserRouter>
</PouchDBProvider>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/CommentField/CommentField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CommentButton } from './components/CommentButton';
interface Props {
commenterName: string;
avatar?: string;
createdAt: string;
createdAt: number;
}

interface CompoundComponents {
Expand Down
6 changes: 3 additions & 3 deletions src/components/VoteCard/VoteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Button as VoteCardUtilButton } from './components';
interface Props {
voteCount: number;
onVoteClick?: () => void | Promise<void>;
voter: string;
authorName: string;
hasVoted?: boolean;
}

Expand All @@ -28,7 +28,7 @@ interface CompoundComponents {
export const VoteCard: FC<Props> & CompoundComponents = ({
voteCount,
onVoteClick,
voter,
authorName,
hasVoted,
children,
}) => {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const VoteCard: FC<Props> & CompoundComponents = ({
</Text>
</FlexItem>
<FlexItem>
<Title headingLevel="h6">{voter}</Title>
<Title headingLevel="h6">{authorName}</Title>
</FlexItem>
<Flex
justifyContent={{ default: 'justifyContentCenter' }}
Expand Down
Loading

0 comments on commit de7355c

Please sign in to comment.