Skip to content

Commit

Permalink
Change button to clickable text
Browse files Browse the repository at this point in the history
  • Loading branch information
prasm313 committed Apr 4, 2024
1 parent 6f3c64d commit 2a376c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { MissionRestartButton } from 'components/Displays/MissionButtons/MissionRestartButton'
import { TaskStatus } from 'models/Task'
import { useNavigate } from 'react-router-dom'
import { TextAlignedButton } from 'components/Styles/StyledComponents'
import { formatDateTime } from 'utils/StringFormatting'

enum InspectionTableColumns {
Expand Down Expand Up @@ -62,9 +61,12 @@ export const HistoricMissionCard = ({ index, mission }: IndexedMissionProps) =>
<MissionStatusDisplay status={mission.status} />
</Table.Cell>
<Table.Cell id={InspectionTableColumns.Name}>
<TextAlignedButton variant="ghost" onClick={routeChange}>
<Typography
link
onClick={() => navigate(`${config.FRONTEND_BASE_ROUTE}/mission/${mission.id}`)}
>
{mission.name}
</TextAlignedButton>
</Typography>
</Table.Cell>
<Table.Cell id={InspectionTableColumns.Area}>
<Typography>{mission.area?.areaName}</Typography>
Expand Down
12 changes: 9 additions & 3 deletions frontend/src/utils/InfoText.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { Typography, Icon } from '@equinor/eds-core-react'
import { useLanguageContext } from 'components/Contexts/LanguageContext'
import { Icons } from 'utils/icons'
import styled from 'styled-components'

const StyledDiv = styled.div`
display: flex;
align-items: center;
`

export const SmallScreenInfoText = () => {
const { TranslateText } = useLanguageContext()
return (
<div id="SmallScreenInfoText">
<Icon name={Icons.Info} size={24}></Icon>
<StyledDiv id="SmallScreenInfoText">
<Icon name={Icons.Info}> </Icon>
<Typography>{TranslateText('Small screen info text')}</Typography>
</div>
</StyledDiv>
)
}

0 comments on commit 2a376c4

Please sign in to comment.