Skip to content

Commit

Permalink
chore(JFrog Artifactory): remove <component-name>.defaultProps (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
anilabhabaral authored Aug 25, 2023
1 parent 287235a commit 5306e7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export const JfrogArtifactoryDashboardPage = () => {
const { entity } = useEntity();
const { imageName } = useJfrogArtifactoryAppData({ entity });

return <JfrogArtifactoryRepository image={imageName} widget={false} />;
return <JfrogArtifactoryRepository image={imageName} />;
};
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const useLocalStyles = makeStyles({
},
});

export function JfrogArtifactoryRepository(props: RepositoryProps) {
export function JfrogArtifactoryRepository({ image }: RepositoryProps) {
const jfrogArtifactoryClient = useApi(jfrogArtifactoryApiRef);
const classes = useStyles();
const localClasses = useLocalStyles();
const [edges, setEdges] = useState<Edge[]>([]);
const title = `Jfrog Artifactory repository: ${props.image}`;
const titleprop = `Jfrog Artifactory repository: ${image}`;

const { loading } = useAsync(async () => {
const tagsResponse = await jfrogArtifactoryClient.getTags(props.image);
const tagsResponse = await jfrogArtifactoryClient.getTags(image);

setEdges(tagsResponse.data.versions.edges);

Expand Down Expand Up @@ -66,7 +66,7 @@ export function JfrogArtifactoryRepository(props: RepositoryProps) {
return (
<div style={{ border: '1px solid #ddd' }}>
<Table
title={title}
title={titleprop}
options={{ paging: true, padding: 'dense' }}
data={data}
columns={columns}
Expand All @@ -81,11 +81,6 @@ export function JfrogArtifactoryRepository(props: RepositoryProps) {
);
}

JfrogArtifactoryRepository.defaultProps = {
title: 'Docker Images',
};
interface RepositoryProps {
widget: boolean;
image: string;
title: string;
}

0 comments on commit 5306e7d

Please sign in to comment.