refactor: replace relative paths with absolute ones in import statements
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Companies } from '../../interfaces/shared/search';
|
||||
import { Companies } from 'src/interfaces/shared/search';
|
||||
import Link from 'next/link';
|
||||
|
||||
import styles from '../../styles/modules/components/find/company.module.scss';
|
||||
import styles from 'src/styles/modules/components/find/company.module.scss';
|
||||
|
||||
type Props = {
|
||||
company: Companies[0];
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { Keywords } from '../../interfaces/shared/search';
|
||||
import Link from 'next/link';
|
||||
|
||||
import styles from '../../styles/modules/components/find/keyword.module.scss';
|
||||
import { Keywords } from 'src/interfaces/shared/search';
|
||||
import styles from 'src/styles/modules/components/find/keyword.module.scss';
|
||||
|
||||
type Props = {
|
||||
keyword: Keywords[0];
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { People } from '../../interfaces/shared/search';
|
||||
import Image from 'next/future/image';
|
||||
import Link from 'next/link';
|
||||
import { modifyIMDbImg } from '../../utils/helpers';
|
||||
import styles from '../../styles/modules/components/find/person.module.scss';
|
||||
import { People } from 'src/interfaces/shared/search';
|
||||
import { modifyIMDbImg } from 'src/utils/helpers';
|
||||
import styles from 'src/styles/modules/components/find/person.module.scss';
|
||||
|
||||
type Props = {
|
||||
person: People[0];
|
||||
@@ -21,7 +21,7 @@ const Person = ({ person }: Props) => {
|
||||
/>
|
||||
) : (
|
||||
<svg className={styles.imgNA}>
|
||||
<use href="/svg/sprite.svg#icon-image-slash" />
|
||||
<use href='/svg/sprite.svg#icon-image-slash' />
|
||||
</svg>
|
||||
)}
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@ const Person = ({ person }: Props) => {
|
||||
{person.aka && <p>{person.aka}</p>}
|
||||
{person.jobCateogry && <p>{person.jobCateogry}</p>}
|
||||
{(person.knownForTitle || person.knownInYear) && (
|
||||
<ul className={styles.basicInfo} aria-label="quick facts">
|
||||
<ul className={styles.basicInfo} aria-label='quick facts'>
|
||||
{person.knownForTitle && <li>{person.knownForTitle}</li>}
|
||||
{person.knownInYear && <li>{person.knownInYear}</li>}
|
||||
</ul>
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { Titles } from '../../interfaces/shared/search';
|
||||
import Image from 'next/future/image';
|
||||
import Link from 'next/link';
|
||||
import { modifyIMDbImg } from '../../utils/helpers';
|
||||
|
||||
import styles from '../../styles/modules/components/find/title.module.scss';
|
||||
import { Titles } from 'src/interfaces/shared/search';
|
||||
import { modifyIMDbImg } from 'src/utils/helpers';
|
||||
import styles from 'src/styles/modules/components/find/title.module.scss';
|
||||
|
||||
type Props = {
|
||||
title: Titles[0];
|
||||
@@ -22,7 +21,7 @@ const Title = ({ title }: Props) => {
|
||||
/>
|
||||
) : (
|
||||
<svg className={styles.imgNA}>
|
||||
<use href="/svg/sprite.svg#icon-image-slash" />
|
||||
<use href='/svg/sprite.svg#icon-image-slash' />
|
||||
</svg>
|
||||
)}
|
||||
</div>
|
||||
@@ -30,7 +29,7 @@ const Title = ({ title }: Props) => {
|
||||
<Link href={`/title/${title.id}`}>
|
||||
<a className={`heading ${styles.heading}`}>{title.name}</a>
|
||||
</Link>
|
||||
<ul aria-label="quick facts" className={styles.basicInfo}>
|
||||
<ul aria-label='quick facts' className={styles.basicInfo}>
|
||||
{title.type && <li>{title.type}</li>}
|
||||
{title.sAndE && <li>{title.sAndE}</li>}
|
||||
{title.releaseYear && <li>{title.releaseYear}</li>}
|
||||
@@ -42,11 +41,11 @@ const Title = ({ title }: Props) => {
|
||||
</p>
|
||||
)}
|
||||
{title.seriesId && (
|
||||
<ul aria-label="quick series facts" className={styles.seriesInfo}>
|
||||
<ul aria-label='quick series facts' className={styles.seriesInfo}>
|
||||
{title.seriesType && <li>{title.seriesType}</li>}
|
||||
<li>
|
||||
<Link href={`/title/${title.seriesId}`}>
|
||||
<a className="link">{title.seriesName}</a>
|
||||
<a className='link'>{title.seriesName}</a>
|
||||
</Link>
|
||||
</li>
|
||||
{title.seriesReleaseYear && <li>{title.seriesReleaseYear}</li>}
|
||||
|
@@ -1,11 +1,10 @@
|
||||
import Find from '../../interfaces/shared/search';
|
||||
import Company from './Company';
|
||||
import Person from './Person';
|
||||
import Title from './Title';
|
||||
|
||||
import styles from '../../styles/modules/components/find/results.module.scss';
|
||||
import Keyword from './Keyword';
|
||||
import { getResTitleTypeHeading } from '../../utils/helpers';
|
||||
import Find from 'src/interfaces/shared/search';
|
||||
import { getResTitleTypeHeading } from 'src/utils/helpers';
|
||||
import styles from 'src/styles/modules/components/find/results.module.scss';
|
||||
|
||||
type Props = {
|
||||
results: Find | null;
|
||||
@@ -43,11 +42,11 @@ const Results = ({ results, className, title }: Props) => {
|
||||
|
||||
return (
|
||||
<article className={`${className} ${styles.results}`}>
|
||||
<h1 className="heading heading__primary">Results for '{title}'</h1>
|
||||
<h1 className='heading heading__primary'>Results for '{title}'</h1>
|
||||
<div className={styles.results__list}>
|
||||
{!!titles.length && (
|
||||
<section className={styles.titles}>
|
||||
<h2 className="heading heading__secondary">
|
||||
<h2 className='heading heading__secondary'>
|
||||
{titlesSectionHeading}
|
||||
</h2>
|
||||
<ul className={styles.titles__list}>
|
||||
@@ -59,7 +58,7 @@ const Results = ({ results, className, title }: Props) => {
|
||||
)}
|
||||
{!!people.length && (
|
||||
<section className={styles.people}>
|
||||
<h2 className="heading heading__secondary">People</h2>
|
||||
<h2 className='heading heading__secondary'>People</h2>
|
||||
<ul className={styles.people__list}>
|
||||
{people.map(person => (
|
||||
<Person person={person} key={person.id} />
|
||||
@@ -69,7 +68,7 @@ const Results = ({ results, className, title }: Props) => {
|
||||
)}
|
||||
{!!companies.length && (
|
||||
<section className={styles.people}>
|
||||
<h2 className="heading heading__secondary">Companies</h2>
|
||||
<h2 className='heading heading__secondary'>Companies</h2>
|
||||
<ul className={styles.people__list}>
|
||||
{companies.map(company => (
|
||||
<Company company={company} key={company.id} />
|
||||
@@ -79,7 +78,7 @@ const Results = ({ results, className, title }: Props) => {
|
||||
)}
|
||||
{!!keywords.length && (
|
||||
<section className={styles.people}>
|
||||
<h2 className="heading heading__secondary">Keywords</h2>
|
||||
<h2 className='heading heading__secondary'>Keywords</h2>
|
||||
<ul className={styles.people__list}>
|
||||
{keywords.map(keyword => (
|
||||
<Keyword keyword={keyword} key={keyword.id} />
|
||||
|
Reference in New Issue
Block a user