Skip to content
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

Landlord text to button #348

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ on its own, run `yarn frontend-dev` or `yarn backend-dev`.
- **Jessica Han** - Developer
- **Grace Sawatyanon** - Developer
- **Miranda Luo** - Developer
- **Kea-Roy Ong** - Developer

### 2022-2023

Expand Down
17 changes: 10 additions & 7 deletions frontend/src/components/Review/Review.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,22 +189,25 @@ const ReviewComponent = ({
return (
showLabel && (
<>
<Grid style={{ fontWeight: 'bold', marginRight: '5px' }}>
{apt.length > 0 ? 'Property: ' : 'Landlord: '}
</Grid>
<Link
{...{
to: apt.length > 0 ? `/apartment/${review.aptId}` : `/landlord/${review.landlordId}`,
style: {
color: 'black',
textDecoration: 'underline',
paddingBottom: '3px',
textDecoration: 'none',
display: 'inline-block',
width: '100%',
paddingLeft: '3px',
},
component: RouterLink,
}}
onClick={handleLinkClick}
>
{apt.length > 0 ? apt[0].name : landlordData ? landlordData.name : ''}
<Button>
<Grid style={{ fontWeight: 'bold', marginRight: '5px' }}>
{apt.length > 0 ? 'Property: ' : 'Landlord: '}
</Grid>
{apt.length > 0 ? apt[0].name : landlordData ? landlordData.name : ''}
</Button>
</Link>
</>
)
Expand Down
Loading