Skip to content

Commit

Permalink
Update dashboard styling
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Nov 27, 2023
1 parent f50af6f commit d46783e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pages/findings/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Create = () => {
<LoginRequiredModal show={showModal} />
<Flex justifyContent="space-between" alignItems="center">
<Heading h={1}>{intl.formatMessage({id: 'Findings.Create.Title'})}</Heading>
<NLink href='/findings/dashboard'><Button hollow>{intl.formatMessage({id: 'Findings.Dashboard.Short'})}</Button></NLink>
<NLink href='/findings/dashboard'><Button hollow>{intl.formatMessage({id: 'Findings.Dashboard.ShortTitle'})}</Button></NLink>
</Flex>
<Form onSubmit={onSubmit} defaultValues={defaultValues} />
</Container> :
Expand Down
10 changes: 6 additions & 4 deletions pages/findings/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { formatMediumDate } from 'utils'
import { useRouter } from 'next/router'
import { useIntl } from 'react-intl'
import { publishIncidentReport, unpublishIncidentReport } from 'lib/api'
import { FaSort, FaSortDown, FaSortUp } from 'react-icons/fa'

const StyledTable = styled.table`
border-collapse: collapse;
Expand Down Expand Up @@ -160,7 +161,7 @@ const Dashboard = () => {
<tr key={headerGroup.id}>
{headerGroup.headers.map((header, i) => {
return (
<th key={header.id} colSpan={header.colSpan} style={i === 0 ? {width: '370px'} : {}}>
<th key={header.id} colSpan={header.colSpan} style={i === 0 ? {width: '328px'} : {}}>
{header.isPlaceholder ? null : (
<div
{...{
Expand All @@ -169,15 +170,16 @@ const Dashboard = () => {
: '',
onClick: header.column.getToggleSortingHandler(),
}}
style={{display: 'ruby', cursor: 'pointer'}}
>
{flexRender(
header.column.columnDef.header,
header.getContext()
)}
{{
asc: ' 🔼',
desc: ' 🔽',
}[header.column.getIsSorted()] ?? null}
asc: <> <FaSortUp /></>,
desc: <> <FaSortDown /></>,
}[header.column.getIsSorted()] ?? <> <FaSort /></>}
</div>
)}
</th>
Expand Down
2 changes: 1 addition & 1 deletion pages/findings/edit/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const EditReport = () => {
<Container>
<Flex justifyContent="space-between" alignItems="center">
<Heading h={1}>{intl.formatMessage({id: 'Findings.Edit.Title'})}</Heading>
<NLink href='/findings/dashboard'><Button hollow>{intl.formatMessage({id: 'Findings.Dashboard.Short'})}</Button></NLink>
<NLink href='/findings/dashboard'><Button hollow>{intl.formatMessage({id: 'Findings.Dashboard.ShortTitle'})}</Button></NLink>
</Flex>
{defaultValues && (
<>
Expand Down

1 comment on commit d46783e

@vercel
Copy link

@vercel vercel bot commented on d46783e Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

explorer – ./

explorer-ooni1.vercel.app
explorer-one.vercel.app
explorer-git-master-ooni1.vercel.app

Please sign in to comment.