mirror of https://gitlab.com/ecentrics/concordia
				
				
			
				 3 changed files with 50 additions and 32 deletions
			
			
		| @ -1,16 +1,23 @@ | |||
| import React from 'react'; | |||
| import { Container, Header, Icon } from 'semantic-ui-react'; | |||
| import { useTranslation } from 'react-i18next'; | |||
| 
 | |||
| const PollDataInvalid = () => ( | |||
|     <Container id="topic-poll-data-invalid-container"> | |||
|         <Header as="h3"> | |||
|             <Icon name="warning sign" color="red" /> | |||
|             <Header.Content> | |||
|                 This topic has a poll but the data are untrusted! | |||
|                 <Header.Subheader>The poll data downloaded from the poster have been tampered with.</Header.Subheader> | |||
|             </Header.Content> | |||
|         </Header> | |||
|     </Container> | |||
| ); | |||
| const PollDataInvalid = () => { | |||
|   const { t } = useTranslation(); | |||
| 
 | |||
|   return ( | |||
|       <Container id="topic-poll-data-invalid-container" textAlign="center"> | |||
|           <Header as="h3" icon textAlign="center"> | |||
|               <Icon name="warning sign" color="red" /> | |||
|               <Header.Content> | |||
|                   {t('topic.poll.invalid.data.header')} | |||
|                   <Header.Subheader> | |||
|                       {t('topic.poll.invalid.data.sub.header')} | |||
|                   </Header.Subheader> | |||
|               </Header.Content> | |||
|           </Header> | |||
|       </Container> | |||
|   ); | |||
| }; | |||
| 
 | |||
| export default PollDataInvalid; | |||
|  | |||
| @ -1,21 +1,26 @@ | |||
| import React from 'react'; | |||
| import { Container, Header, Icon } from 'semantic-ui-react'; | |||
| import { Link } from 'react-router-dom'; | |||
| import { useTranslation } from 'react-i18next'; | |||
| 
 | |||
| const PollGuestView = () => ( | |||
|     <Container id="topic-poll-guest-view-container" textAlign="center"> | |||
|         <Header as="h3" icon textAlign="center"> | |||
|             <Icon name="signup" /> | |||
|             <Header.Content> | |||
|                 Only registered users are able to vote in polls. | |||
|                 <Header.Subheader> | |||
|                     You can register in the  | |||
|                     <Link to="/auth/register">signup</Link> | |||
|                      page. | |||
|                 </Header.Subheader> | |||
|             </Header.Content> | |||
|         </Header> | |||
|     </Container> | |||
| ); | |||
| const PollGuestView = () => { | |||
|   const { t } = useTranslation(); | |||
| 
 | |||
|   return ( | |||
|       <Container id="topic-poll-guest-view-container" textAlign="center"> | |||
|           <Header as="h3" icon textAlign="center"> | |||
|               <Icon name="signup" /> | |||
|               <Header.Content> | |||
|                   {t('topic.poll.guest.header')} | |||
|                   <Header.Subheader> | |||
|                       {t('topic.poll.guest.sub.header.pre')} | |||
|                       <Link to="/auth/register">{t('topic.poll.guest.sub.header.link')}</Link> | |||
|                       {t('topic.poll.guest.sub.header.post')} | |||
|                   </Header.Subheader> | |||
|               </Header.Content> | |||
|           </Header> | |||
|       </Container> | |||
|   ); | |||
| }; | |||
| 
 | |||
| export default PollGuestView; | |||
|  | |||
					Loading…
					
					
				
		Reference in new issue