-
Notifications
You must be signed in to change notification settings - Fork 2
[issue86] add rating to books #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
RawandDev
wants to merge
37
commits into
dev
Choose a base branch
from
RawandDev/issue86
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
c3ca965
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 9beda6d
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev bbe0c30
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev b6ebf2e
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 25b998c
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev b6bd1f9
resolve(conflicts): resolve conflicts with deleting the book component
RawandDev 354438c
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev e56c76e
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev abe7ea6
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev b056604
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 02807e1
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 300f13f
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev f8412c7
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev c17a7fb
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev cac7006
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 2569f64
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 06ee4f7
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 2d767f4
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev b985464
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 59f64d3
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev c854ffc
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 2ce4e24
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 983e7d8
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev ce2fb2d
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 72a091a
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev d2a3a5d
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev f2fd1d2
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 0a4766b
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 28c1820
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev c391813
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 867f5f9
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev 1f98d59
Merge branch 'dev' of github.com:Iraq-RBC-Capstones-2021/capstone-rea…
RawandDev d6156c8
feat(rating): add rating system
RawandDev e840a2d
refactor(bookcard): refactor bookcard component to latest changes
RawandDev c667ed4
feat(total): add total rating with toFixed
RawandDev 2f1f485
resolve(conflicts): resolve conflicts
RawandDev 643e66b
refactor(codes): refactor by deleting extra price with total rating
RawandDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 { createSlice } from "@reduxjs/toolkit"; | ||
|
|
||
| const initialState = { | ||
| totalRaters: 0, | ||
| totalRating: 0, | ||
| rating: 0, | ||
| ratersUID: [], | ||
| }; | ||
|
|
||
| const ratingsSlice = createSlice({ | ||
| name: "ratings", | ||
| initialState, | ||
| reducers: { | ||
| setRatings: (state, action) => { | ||
| state.totalRaters = action.payload.totalRaters; | ||
| state.totalRating = action.payload.totalRating; | ||
| state.rating = action.payload.rating; | ||
| state.ratersUID = action.payload.ratersUID; | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| export const { setRatings } = ratingsSlice.actions; | ||
| export default ratingsSlice.reducer; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user shouldn't be able to rate if he's not signed in, but he could see the rates only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already implemented