Skip to content

Commit

Permalink
fix(Algolia): linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bkapustik committed Apr 9, 2024
1 parent 7bad601 commit f1dca95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { Box, Headline, HeadlineSize, Spacing, Stack, Table, type TableColumn, type TableRow } from '@kentico/xperience-admin-components'
import { RoutingContentPlaceholder, usePageCommand } from '@kentico/xperience-admin-base'
import localization from '../localization/localization.json'
import { Box, Headline, HeadlineSize, Spacing, Stack, Table, type TableColumn, type TableRow } from '@kentico/xperience-admin-components'
import React from 'react'
import Localization from '../localization/localization.json'

interface IndexedContentPageProps {
readonly pathColumns: TableColumn[]
Expand All @@ -18,18 +18,19 @@ const Commands = {
ShowPathDetail: 'ShowPathDetail'
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const IndexedContentTemplate = ({ pathColumns, pathRows, propertyColumns, propertyRows }: IndexedContentPageProps): JSX.Element => {
usePageCommand<void, PathDetailArguments>(Commands.ShowPathDetail)

return (
<RoutingContentPlaceholder>
<Stack spacing={Spacing.XXL}>
<Headline size={HeadlineSize.M}>{localization.integrations.algolia.content.headlines.main}</Headline>
<Headline size={HeadlineSize.M}>{Localization.integrations.algolia.content.headlines.main}</Headline>
<Box>
<Headline size={HeadlineSize.S}>{localization.integrations.algolia.content.headlines.paths}</Headline>
<Headline size={HeadlineSize.S}>{Localization.integrations.algolia.content.headlines.paths}</Headline>
</Box>
<Box>
<Headline size={HeadlineSize.S}>{localization.integrations.algolia.content.headlines.properties}</Headline>
<Headline size={HeadlineSize.S}>{Localization.integrations.algolia.content.headlines.properties}</Headline>
<Table columns={propertyColumns} rows={propertyRows} />
</Box>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { usePageCommand } from '@kentico/xperience-admin-base'
import { Box, Headline, HeadlineSize, Pagination, Spacing, Stack, Table, type TableCell, type TableColumn, type TableRow } from '@kentico/xperience-admin-components'
import React, { useState } from 'react'
import localization from '../localization/localization.json'
import Localization from '../localization/localization.json'

const ListingCommands = {
LoadData: 'LoadData'
Expand Down Expand Up @@ -84,19 +84,19 @@ export const PathDetailTemplate = ({ aliasPath, columns }: PathDetailPageProps):

return (
<Stack spacing={Spacing.XL}>
<Headline size={HeadlineSize.L}>{localization.integrations.algolia.pathdetail.headlines.main}</Headline>
<Headline size={HeadlineSize.L}>{Localization.integrations.algolia.pathdetail.headlines.main}</Headline>
<Box>
<Headline size={HeadlineSize.S}>{localization.integrations.algolia.pathdetail.headlines.path}</Headline>
<Headline size={HeadlineSize.S}>{Localization.integrations.algolia.pathdetail.headlines.path}</Headline>
<span>{aliasPath}</span>
</Box>
<Box>
<Headline size={HeadlineSize.S}>{localization.integrations.algolia.pathdetail.headlines.pagetypes}</Headline>
<Headline size={HeadlineSize.S}>{Localization.integrations.algolia.pathdetail.headlines.pagetypes}</Headline>
{tableData.totalCount > 0
? (
<Table isHeaderVisible={false} ref={tableRef} columns={columns.filter(c => c.visible)} rows={prepareRows(tableData.rows)} />
)
: (
<p>{localization.integrations.algolia.messages.norecords}</p>
<p>{Localization.integrations.algolia.messages.norecords}</p>
)}
</Box>

Expand Down

0 comments on commit f1dca95

Please sign in to comment.