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

Comment login link style update #1190

Merged
merged 2 commits into from
Jul 16, 2021
Merged
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
22 changes: 18 additions & 4 deletions src/components/Comment/CommentTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Box, Text } from 'rebass/styled-components'
import theme from 'src/themes/styled.theme'
import { Avatar } from '../Avatar'
import { useCommonStores } from 'src'
import { Link } from 'react-router-dom'
import { Link } from '../Links'

export interface IProps {
onSubmit: (string) => Promise<void>
Expand Down Expand Up @@ -60,6 +60,10 @@ const TextStyled = styled(Text)`
bottom: 6px;
`

const LoginTextStyled = styled(Text)`
padding: 1.5em 1em;
`

export const CommentTextArea = ({ onChange, comment, loading }) => {
const { stores } = useCommonStores()
const user = stores.userStore.activeUser
Expand All @@ -81,9 +85,19 @@ export const CommentTextArea = ({ onChange, comment, loading }) => {
placeholder="Leave your questions or feedback..."
/>
) : (
<Text height="2em" lineHeight="2em">
Hi there! <Link to="/sign-in">Login</Link> to leave a comment
</Text>
<LoginTextStyled>
Hi there!{' '}
<Link
to="/sign-in"
sx={{
textDecoration: 'underline',
color: 'inherit',
}}
>
Login
</Link>{' '}
to leave a comment
</LoginTextStyled>
)}
</TextBoxStyled>
{user && <TextStyled fontSize="2">{comment.length}/400</TextStyled>}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/admin/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AdminTags } from './content/AdminTags'
import { AdminUsers } from './content/AdminUsers'
import { AdminBetaTesters } from './content/AdminBetaTesters'
import { AuthWrapper } from 'src/components/Auth/AuthWrapper'
import { Link } from 'react-router-dom'
import { Link } from 'src/components/Links'
import Text from 'src/components/Text'
import Flex from 'src/components/Flex'
import { Box } from 'rebass'
Expand Down