Skip to content

Commit

Permalink
fix(project): removing use of components instead of just nullifying them
Browse files Browse the repository at this point in the history
  • Loading branch information
Lillebo committed Oct 2, 2024
1 parent 75c9805 commit 128e5e4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import { Heading } from '@digdir/designsystemet-react';
import Markdown from '@fdk-frontend/ui/markdown';
import CatalogSymbol from '@fdk-frontend/ui/catalog-symbol';

import styles from './result-item.module.scss';

Expand Down Expand Up @@ -30,10 +29,6 @@ const ResultItem = ({ item, baseUri, ...rest }: ResultItemProps & React.AnchorHT
className={styles.link}
{...rest}
>
<CatalogSymbol
className={styles.icon}
catalog='datasets'
/>
<div>
<Heading
className={styles.heading}
Expand Down
2 changes: 0 additions & 2 deletions libs/ui/src/lib/catalog-symbol/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export type CatalogSymbolProps = {
};

const CatalogIcon = ({ catalog, ...rest }: CatalogSymbolProps & React.SVGProps<SVGSVGElement>) => {
return null;
switch (catalog) {
case 'datasets':
return <FilesIcon {...rest} />;
Expand All @@ -30,7 +29,6 @@ const CatalogIcon = ({ catalog, ...rest }: CatalogSymbolProps & React.SVGProps<S
};

const CatalogSymbol = ({ catalog, className, ...rest }: CatalogSymbolProps & React.SVGProps<SVGSVGElement>) => {
return null;
return (
<div className={cn(styles.catalogSymbol, className)}>
<CatalogIcon
Expand Down
6 changes: 0 additions & 6 deletions libs/ui/src/lib/catalogs-menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { motion } from 'framer-motion';
import { Link, Heading, Card, Paragraph } from '@digdir/designsystemet-react';

import { Dictionary } from '@fdk-frontend/dictionaries';
import { CatalogTypes } from '@fdk-frontend/types';
import CatalogSymbol from '../catalog-symbol/';
import getMainMenuData from '../main-menu/data';

import styles from './catalogs-menu.module.scss';
Expand Down Expand Up @@ -58,10 +56,6 @@ const CatalogsMenu = ({ dictionary, baseUri }: CatalogsMenuProps) => {
size='xxsmall'
level={3}
>
<CatalogSymbol
className={styles.catalogIcon}
catalog={item.key as CatalogTypes}
/>
<span>{item.title}</span>
</Heading>
</Card.Header>
Expand Down
6 changes: 0 additions & 6 deletions libs/ui/src/lib/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { Link, Heading } from '@digdir/designsystemet-react';
import { ExternalLinkIcon } from '@navikt/aksel-icons';
import { Dictionary } from '@fdk-frontend/dictionaries';
import { CatalogTypes } from '@fdk-frontend/types';

import { CatalogIcon } from '../catalog-symbol';
import { LogoLink } from '../logo';
import getMainMenuData from '../main-menu/data';
import LanguageSwitcher from '../language-switcher';
Expand Down Expand Up @@ -42,10 +40,6 @@ const Footer = ({ dictionary, baseUri }: FooterProps) => {
className={styles.iconLink}
href={item.href}
>
<CatalogIcon
catalog={item.key as CatalogTypes}
fontSize='1.5em'
/>
{item.title}
</Link>
</li>
Expand Down

0 comments on commit 128e5e4

Please sign in to comment.