Merge pull request #200 from jorilallo/issue-199

Fixes: Issues with starring
This commit is contained in:
Jori Lallo
2017-09-03 12:18:40 -07:00
committed by GitHub
2 changed files with 10 additions and 6 deletions

View File

@@ -19,13 +19,9 @@ const StyledStar = styled(StarIcon)`
top: 2px;
position: relative;
margin-left: 4px;
opacity: ${props => (props.solid ? 1 : 0.25)};
opacity: ${props => (props.solid ? '1 !important' : 0)};
transition: opacity 100ms ease-in-out;
&:hover {
opacity: 1;
}
svg {
width: 1em;
height: 1em;
@@ -48,6 +44,14 @@ const DocumentLink = styled(Link)`
background: ${color.smokeLight};
border: 2px solid ${color.smoke};
outline: none;
${StyledStar} {
opacity: .25;
&:hover {
opacity: 1;
}
}
}
&:focus {

View File

@@ -31,7 +31,7 @@ async function present(ctx: Object, document: Document, options: ?Options) {
lastViewedAt: undefined,
team: document.teamId,
collaborators: [],
starred: !!document.starred,
starred: !!(document.starred && document.starred.length),
collaboratorCount: undefined,
collection: undefined,
views: undefined,