Skip to content

Commit

Permalink
Lint fixes.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
  • Loading branch information
jctanner committed Sep 21, 2023
1 parent f7eb2ba commit fe03bd7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { LegacyNamespaceDetailType } from 'src/api';
import { Logo, StatefulDropdown } from 'src/components';
import { AppContext } from 'src/loaders/app-context';
import { Paths, formatPath } from 'src/paths';
import { getProviderInfo } from 'src/utilities/legacy-namespace';
import './legacy-namespace-item.scss';

interface LegacyNamespaceProps {
Expand All @@ -27,8 +26,6 @@ export class LegacyNamespaceListItem extends React.Component<LegacyNamespaceProp
namespaceid: namespace.id,
});

const provider_details = getProviderInfo(namespace);

const cells = [];

cells.push(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ProviderLink extends React.Component<IProps> {
}

render() {
const { id, name, url } = this.props;
const { name, url } = this.props;

return (
<TextContent>
Expand Down
15 changes: 0 additions & 15 deletions src/components/legacy-role-list/legacy-role-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import {
DataListItemCells,
DataListItemRow,
LabelGroup,
Text,
TextContent,
TextVariants,
} from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
Expand All @@ -32,9 +29,6 @@ export class LegacyRoleListItem extends React.Component<LegacyRoleProps> {
username: role.github_user,
name: role.name,
});
const namespace_url = formatPath(Paths.legacyNamespace, {
namespaceid: namespace.id,
});

let release_date = null;
let release_name = null;
Expand Down Expand Up @@ -83,15 +77,6 @@ export class LegacyRoleListItem extends React.Component<LegacyRoleProps> {
<Link to={role_url}>
{namespace.name}.{role.name}
</Link>
{/*
<TextContent>
<Text component={TextVariants.small}>
<Trans>
Provided by <Link to={namespace_url}>{namespace.name}</Link>
</Trans>
</Text>
</TextContent>
*/}
<ProviderLink
id={provider.id}
name={provider.name}
Expand Down
4 changes: 0 additions & 4 deletions src/utilities/legacy-namespace.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export function getProviderInfo(data) {
console.log('DATA', data);

let provider = null;

if (data.summary_fields.hasOwnProperty('provider_namespace')) {

Check failure on line 4 in src/utilities/legacy-namespace.ts

View workflow job for this annotation

GitHub Actions / pr-checks

Do not access Object.prototype method 'hasOwnProperty' from target object
Expand All @@ -11,8 +9,6 @@ export function getProviderInfo(data) {
provider = data.summary_fields.provider_namespaces[0];
}

console.log('FINAL PROVIDER', provider);

if (provider === null || provider === undefined) {
return {
id: null,
Expand Down

0 comments on commit fe03bd7

Please sign in to comment.