Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions components/affiliates/AffiliateCard/AffiliateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ const AffiliateCard: FC<AffiliateCardProps> = ({ affiliate }) => {
/>
</div>
<div>
<Link href={affiliate.href}>
<a
className={styles.affiliateLink}
href={affiliate.href}
target="_blank"
rel="noreferrer">
<Heading level={3} className={styles.affiliateName}>
{affiliate.headline}
</Heading>
</a>
<Link
href={affiliate.href}
className={styles.affiliateLink}
target="_blank"
rel="noreferrer">
<Heading level={3} className={styles.affiliateName}>
{affiliate.headline}
</Heading>
</Link>

<ReactMarkdown className={styles.description}>
Expand All @@ -45,9 +43,9 @@ const AffiliateCard: FC<AffiliateCardProps> = ({ affiliate }) => {

<div className={styles.cta}>
<Link
passHref
href={affiliate.href}
target="_blank"
rel="noreferrer"
className={styles.affiliateLink}>
<Button className={styles.button} theme="primary">
{affiliate.callToAction}
Expand Down
69 changes: 0 additions & 69 deletions components/blog/queries/articles.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/blog/queries/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion components/core/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Footer: FC = () => {
return (
<footer className={styles.footer}>
<Wrapper className={styles.wrapper}>
<Link passHref href="/" className={styles.logoLink}>
<Link href="/" className={styles.logoLink}>
<Image
height="30"
width="30"
Expand Down
1 change: 0 additions & 1 deletion components/core/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const Navbar: FC = () => {
<Wrapper className={styles.wrapper}>
<div className={styles.logoWrapper}>
<Link
passHref
href="/"
className={styles.logo}
aria-label="Analysis Tools Homepage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface SearchResult {

const Hit = (result: SearchResult) => {
return (
<Link href={result.hit.fields.slug} passHref>
<Link href={result.hit.fields.slug}>
<Highlight attribute="name" hit={result.hit} />
</Link>
);
Expand Down
2 changes: 0 additions & 2 deletions components/homepage/queries/index.ts

This file was deleted.

69 changes: 0 additions & 69 deletions components/homepage/queries/mostViewed.ts

This file was deleted.

71 changes: 0 additions & 71 deletions components/homepage/queries/popularLanguages.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/sponsors/SponsorCard/SponsorCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const SponsorCard: FC<SponsorCardProps> = ({ sponsor }) => {
</div>
<div className={styles.info}>
<Link
passHref
href={`/tool/${sponsor.tool}`}
className={styles.toolLink}>
<Heading level={3} className={styles.toolName}>
Expand Down
5 changes: 3 additions & 2 deletions components/tags/TagsSidebar/FilterCard/FilterCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { FC } from 'react';
import { Input } from '@components/elements';
import { Card } from '@components/layout';
import { Heading } from '@components/typography';
import { FilterKey, OnFilterChange } from '@components/tags/types';

import styles from './FilterCard.module.css';
import classNames from 'classnames';
Expand All @@ -14,10 +15,10 @@ export interface FilterOption {

export interface FilterCardProps {
heading: string;
filter: string;
filter: FilterKey;
options: FilterOption[];
className?: string;
onFilterChange: (filter: string, value: string, checked: boolean) => void;
onFilterChange: OnFilterChange;
}

const FilterCard: FC<FilterCardProps> = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ const RelatedCard: FC<RelatedCardProps> = ({
</li>
))}
<li key={'all'}>
<Link
passHref={true}
href={`/tools`}
className={styles.relatedLink}>
<Link href={`/tools`} className={styles.relatedLink}>
<Image
src={`/assets/icons/general/back.svg`}
alt={'Other Languages'}
Expand Down
3 changes: 2 additions & 1 deletion components/tags/TagsSidebar/TagsSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { BlogPreview } from '@components/blog';
import { ContributionCard, Newsletter } from '@components/elements';
import { Sidebar } from '@components/layout';
import { FilterCard, RelatedCard } from './FilterCard';
import { OnFilterChange } from '@components/tags/types';
import styles from './TagsSidebar.module.css';

import {
Expand All @@ -17,7 +18,7 @@ import { LanguageFilterOption } from './FilterCard/LanguageFilterCard';
export interface TagsSidebarProps {
previews: ArticlePreview[];
relatedLanguages: LanguageFilterOption[];
onFilterChange: (filter: string, value: string, checked: boolean) => void;
onFilterChange: OnFilterChange;
}

const TagsSidebar: FC<TagsSidebarProps> = ({
Expand Down
1 change: 1 addition & 0 deletions components/tags/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './TagsSidebar';
export * from './types';
23 changes: 23 additions & 0 deletions components/tags/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Valid filter keys for tool filtering
*/
export type FilterKey = 'categories' | 'types' | 'licenses' | 'pricing';

/**
* State object for tool filters
*/
export interface FiltersState {
categories: string[];
types: string[];
licenses: string[];
pricing: string[];
}

/**
* Callback type for filter changes
*/
export type OnFilterChange = (
filter: FilterKey,
value: string,
checked: boolean,
) => void;
Loading