Skip to content

Commit

Permalink
fix(ojoi): tweak footer and cleanup code (#15485)
Browse files Browse the repository at this point in the history
* chore: linting

* fix: move footer background to container

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Valur and kodiakhq[bot] authored Jul 9, 2024
1 parent a9013be commit 13b66f5
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react'
import { ReactNode } from 'react'

import {
Box,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Locale } from '@island.is/shared/types'

import { Stack } from '@island.is/island-ui/core'
import { Locale } from '@island.is/shared/types'
import { OfficialJournalOfIcelandAdvertsResponse } from '@island.is/web/graphql/schema'
import { useLinkResolver } from '@island.is/web/hooks'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import format from 'date-fns/format'
import is from 'date-fns/locale/is'
import { Locale } from '@island.is/shared/types'

import { LinkV2, Table as T, Text } from '@island.is/island-ui/core'
import { Locale } from '@island.is/shared/types'
import { OfficialJournalOfIcelandAdvertsResponse } from '@island.is/web/graphql/schema'
import { useLinkResolver } from '@island.is/web/hooks'

Expand Down
7 changes: 3 additions & 4 deletions apps/web/components/OfficialJournalOfIceland/OJOIWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode, useEffect, useState } from 'react'
import { ReactNode, useEffect, useState } from 'react'
import { useWindowSize } from 'react-use'
import NextLink from 'next/link'

Expand All @@ -12,7 +12,7 @@ import {
} from '@island.is/island-ui/core'
import { theme } from '@island.is/island-ui/theme'
import { Footer as WebFooter } from '@island.is/web/components'
import { Image, Organization } from '@island.is/web/graphql/schema'
import { Organization } from '@island.is/web/graphql/schema'
import { usePlausiblePageview } from '@island.is/web/hooks'
import SidebarLayout from '@island.is/web/screens/Layouts/SidebarLayout'

Expand Down Expand Up @@ -135,12 +135,11 @@ export const OJOIWrapper = ({

{!sidebarContent && children}

<Box className="rs_read">
<Box className="rs_read" background="blue100">
<WebFooter
imageUrl={organization.logo?.url}
heading={organization.title}
columns={organization.footerItems}
background={organization?.footerConfig?.background}
titleVariant="h2"
/>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/screens/OfficialJournalOfIceland/OJOIAdvert.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useIntl } from 'react-intl'
import { Locale } from '@island.is/shared/types'

import { Box, Button, Link, Stack, Text } from '@island.is/island-ui/core'
import { Locale } from '@island.is/shared/types'
import {
ContentLanguage,
CustomPageUniqueIdentifier,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCallback, useEffect, useMemo, useState } from 'react'
import { useIntl } from 'react-intl'
import { Locale } from '@island.is/shared/types'
import debounce from 'lodash/debounce'
import { useRouter } from 'next/router'

Expand All @@ -18,6 +17,7 @@ import {
Text,
} from '@island.is/island-ui/core'
import { debounceTime } from '@island.is/shared/constants'
import { Locale } from '@island.is/shared/types'
import {
ContentLanguage,
CustomPageUniqueIdentifier,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/screens/OfficialJournalOfIceland/OJOIHome.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useIntl } from 'react-intl'
import { Locale } from '@island.is/shared/types'
import NextLink from 'next/link'

import {
Expand All @@ -13,6 +12,7 @@ import {
Stack,
Text,
} from '@island.is/island-ui/core'
import { Locale } from '@island.is/shared/types'
import { SLICE_SPACING } from '@island.is/web/constants'
import {
ContentLanguage,
Expand Down
4 changes: 2 additions & 2 deletions apps/web/screens/OfficialJournalOfIceland/OJOISearch.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useEffect, useMemo, useState } from 'react'
import { useIntl } from 'react-intl'
import { Locale } from '@island.is/shared/types'
import debounce from 'lodash/debounce'
import { useRouter } from 'next/router'
import { useLazyQuery } from '@apollo/client'
Expand All @@ -16,6 +15,7 @@ import {
Text,
} from '@island.is/island-ui/core'
import { debounceTime } from '@island.is/shared/constants'
import { Locale } from '@island.is/shared/types'
import {
ContentLanguage,
CustomPageUniqueIdentifier,
Expand Down Expand Up @@ -487,7 +487,7 @@ OJOISearch.getProps = async ({ apolloClient, locale }) => {
}

return {
initialAdverts: officialJournalOfIcelandAdverts.adverts,
initialAdverts: officialJournalOfIcelandAdverts?.adverts,
categories: officialJournalOfIcelandCategories?.categories,
departments: officialJournalOfIcelandDepartments?.departments,
types: officialJournalOfIcelandTypes?.types,
Expand Down

0 comments on commit 13b66f5

Please sign in to comment.