Skip to content

Commit

Permalink
Merge pull request #104 from 90lucasgabriel/feature/WJ-102
Browse files Browse the repository at this point in the history
WJ-102 - Covert Movie component to EntityImage
  • Loading branch information
90lucasgabriel committed Nov 7, 2020
2 parents ead7067 + 48a304c commit 284021b
Show file tree
Hide file tree
Showing 56 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/components/Button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled, { css } from 'styled-components';
import { shade } from 'polished';

import DefaultProps from 'shared/dtos';
import { getBackground, getColor } from 'shared/utils';
import { getBackground, getColor } from 'shared/helpers';
import { Color, Size } from 'shared/enums';

interface ButtonProps extends DefaultProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';

import DefaultProps from 'shared/dtos';
import { getBackground, getColor } from 'shared/utils';
import { getBackground, getColor } from 'shared/helpers';

const BasicLayout = styled.div<DefaultProps>`
background: ${props => getBackground(props.theme, props.background)};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components';

import DefaultProps from 'shared/dtos';
import { Color, Size } from 'shared/enums';
import { getColor, getBackground } from 'shared/utils';
import { getColor, getBackground } from 'shared/helpers';

export const Container = styled.div`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/containers/EntityImage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom';
import { BsHeartFill } from 'react-icons/bs';

import { getEntityRoute } from 'shared/utils';
import { getEntityRoute } from 'shared/helpers';
import { useAuth } from 'domains/Auth/hooks';
import { useFavorite } from 'domains/Favorites/hooks';
import { Color } from 'shared/enums';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/EntityImageList/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';
import DefaultProps from 'shared/dtos';
import { Container as DefaultContainer } from 'components/Layout';
import { Color, PosterHeight, Size } from 'shared/enums';
import { getColor } from 'shared/utils';
import { getColor } from 'shared/helpers';

interface LoadingProps {
loaderColor?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/containers/EntitySummary/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react';
import { useHistory } from 'react-router-dom';

import { getEntityRoute } from 'shared/utils';
import { getEntityRoute } from 'shared/helpers';
import Props from 'containers/EntitySummary/types';

import { EntityImage } from 'containers';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Filmography/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react';
import { useHistory } from 'react-router-dom';

import { getEntityRoute } from 'shared/utils';
import { getEntityRoute } from 'shared/helpers';

import { ReactComponent as Loading } from 'assets/loading.svg';
import { Wrapper } from 'components/Layout';
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Filmography/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';
import DefaultProps from 'shared/dtos';
import { Container as DefaultContainer } from 'components/Layout';
import { Color, PosterHeight, Size } from 'shared/enums';
import { getColor } from 'shared/utils';
import { getColor } from 'shared/helpers';

interface LoadingProps {
loaderColor?: string;
Expand Down
5 changes: 3 additions & 2 deletions src/containers/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ const Footer: React.FC<DefaultProps> = ({
<a href="https://github.com/90lucasgabriel">
Desenvolvido por Lucas Gabriel
</a>
<a href="/">Proposta do projeto</a>
<a href="https://github.com/90lucasgabriel/cinejump-web">
Sobre o projeto
</a>
<a href="https://www.figma.com/file/um4dcEJCOlEvB6kCe9KCOD/Cinejump">
Protótipo no Figma
</a>
<a href="/">Apresentação ao Comitê</a>
<a href="https://github.com/90lucasgabriel/cinejump-web/wiki">
Documentação
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Footer/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from 'styled-components';
import DefaultProps from 'shared/dtos';
import { Color, Size } from 'shared/enums';
import { Container as DefaultContainer } from 'components/Layout';
import { getColorByTheme } from 'shared/utils';
import { getColorByTheme } from 'shared/helpers';

export const Container = styled(DefaultContainer)`
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Header/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components';
import { Link as RouterLink } from 'react-router-dom';

import DefaultProps from 'shared/dtos';
import { getColor } from 'shared/utils';
import { getColor } from 'shared/helpers';
import { Container as DefaultContainer } from 'components/Layout';
import { Color, Size } from 'shared/enums';

Expand Down
4 changes: 2 additions & 2 deletions src/domains/Movie/api/Details/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import tmdb from 'services/api/tmdb';

import { arrayToString } from 'shared/utils';
import { arrayToString } from 'shared/helpers';
import {
getBackdrop,
getFeaturedImage,
getReleaseDate,
getReleaseYear,
getSubtitle,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import { EntityType } from 'shared/enums';
import Params from 'domains/Movie/api/Details/types/Params';
Expand Down
2 changes: 1 addition & 1 deletion src/domains/Movie/api/NowPlaying/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getReleaseDate,
getReleaseYear,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import { EntityType } from 'shared/enums';
import Params from 'domains/Movie/api/NowPlaying/types/Params';
Expand Down
2 changes: 1 addition & 1 deletion src/domains/Movie/api/Popular/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getReleaseDate,
getReleaseYear,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import { EntityType } from 'shared/enums';
import Params from 'domains/Movie/api/Popular/types/Params';
Expand Down
2 changes: 1 addition & 1 deletion src/domains/Movie/api/Recommendations/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tmdb from 'services/api/tmdb';

import { formatDate, formatTmdbImage } from 'shared/utils';
import { formatDate, formatTmdbImage } from 'shared/helpers';

import { EntityType } from 'shared/enums';
import RawResponse from 'domains/Movie/api/Recommendations/types/RawResponse';
Expand Down
4 changes: 2 additions & 2 deletions src/domains/Person/api/Details/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tmdb from 'services/api/tmdb';

import { formatDate, getMediaTypeId } from 'shared/utils';
import { formatDate, getMediaTypeId } from 'shared/helpers';
import { EntityType } from 'shared/enums';
import {
getCharacter,
Expand All @@ -11,7 +11,7 @@ import {
getReleaseYear,
getSubtitle,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import Params from 'domains/Person/api/Details/types/Params';
import RawResponse from 'domains/Person/api/Details/types/RawResponse';
Expand Down
4 changes: 2 additions & 2 deletions src/domains/Search/api/Multi/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import tmdb from 'services/api/tmdb';

import { EntityType } from 'shared/enums';
import { getMediaTypeId } from 'shared/utils';
import { getMediaTypeId } from 'shared/helpers';
import {
getBackdrop,
getDescription,
Expand All @@ -11,7 +11,7 @@ import {
getReleaseYear,
getSubtitle,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import Params from 'domains/Search/api/Multi/types/Params';
import RawResponse from 'domains/Search/api/Multi/types/RawResponse';
Expand Down
4 changes: 2 additions & 2 deletions src/domains/Tv/api/Details/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import tmdb from 'services/api/tmdb';

import { arrayToString } from 'shared/utils';
import { arrayToString } from 'shared/helpers';
import {
getBackdrop,
getFeaturedImage,
getReleaseDate,
getReleaseYear,
getSubtitle,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import { EntityType } from 'shared/enums';
import Params from 'domains/Tv/api/Details/types/Params';
Expand Down
2 changes: 1 addition & 1 deletion src/domains/Tv/api/Popular/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getReleaseDate,
getReleaseYear,
getTitle,
} from 'shared/utils/Entity';
} from 'shared/helpers/Entity';

import { EntityType } from 'shared/enums';
import Params from 'domains/Tv/api/Popular/types/Params';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import * as Yup from 'yup';

import { useAuth } from 'domains/Auth/hooks';
import Route from 'routes/enums';
import LoginFormData from 'pages/Login/dtos/LoginFormData';
import getValidationErrors from 'shared/utils/getValidationErrors';
import LoginFormData from 'pages/Login/types/LoginFormData';
import getValidationErrors from 'shared/helpers/getValidationErrors';
import { Color } from 'shared/enums';

import { ColumnLayout } from 'components/Layout';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/Movie/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';

import Params from 'pages/Movie/dtos/Params';
import Params from 'pages/Movie/types/Params';
import MovieDetails from 'domains/Movie/api/Details/types/Response';
import { Color } from 'shared/enums';
import { Details } from 'domains/Movie/api';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/Person/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';

import Params from 'pages/Person/dtos/Params';
import Params from 'pages/Person/types/Params';
import PersonDetails from 'domains/Person/api/Details/types/Response';
import { Color } from 'shared/enums';
import { Details } from 'domains/Person/api';
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/pages/Signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { FormHandles } from '@unform/core';
import * as Yup from 'yup';

import Route from 'routes/enums';
import SignupFormData from 'pages/Signup/dtos/SignupFormData';
import getValidationErrors from 'shared/utils/getValidationErrors';
import SignupFormData from 'pages/Signup/types/SignupFormData';
import getValidationErrors from 'shared/helpers/getValidationErrors';
import api from 'services/api';

import { Color } from 'shared/enums';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/Tv/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';

import Params from 'pages/Tv/dtos/Params';
import Params from 'pages/Tv/types/Params';
import MovieDetails from 'domains/Tv/api/Details/types/Response';
import { Color } from 'shared/enums';
import { Details } from 'domains/Tv/api';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatTmdbImage } from 'shared/utils';
import { formatTmdbImage } from 'shared/helpers';

const getBackdrop = (value: any): string | null => {
return formatTmdbImage({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { arrayToString } from 'shared/utils';
import { arrayToString } from 'shared/helpers';

const getDescription = (value: any): string | null => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatTmdbImage } from 'shared/utils';
import { formatTmdbImage } from 'shared/helpers';

const getFeaturedImage = (value: any): string | null => {
return formatTmdbImage({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatDate } from 'shared/utils';
import { formatDate } from 'shared/helpers';

const getReleaseDate = (value: any): string => {
return formatDate({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Color } from 'shared/enums';
import { getBackgroundByTheme } from 'shared/utils';
import { getBackgroundByTheme } from 'shared/helpers';

const getBackground = (
theme?: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Color } from 'shared/enums';
import { getColorByTheme } from 'shared/utils';
import { getColorByTheme } from 'shared/helpers';

const getColor = (
theme?: string,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FormatDate from 'shared/utils/types/FormatDate';
import FormatDate from 'shared/helpers/types/FormatDate';

const formatDate = ({ value }: FormatDate): string => {
if (!value) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import FormatTmdbImage from 'shared/utils/types/FormatTmdbImage';
import TmdbImageSize from 'shared/utils/enums/TmdbImageSize';
import FormatTmdbImage from 'shared/helpers/types/FormatTmdbImage';
import TmdbImageSize from 'shared/helpers/enums/TmdbImageSize';

const formatTmdbImage = ({
value,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import TmdbImageSize from 'shared/utils/enums/TmdbImageSize';
import TmdbImageSize from 'shared/helpers/enums/TmdbImageSize';

export default interface FormatTmdbImage {
value?: string;
Expand Down

0 comments on commit 284021b

Please sign in to comment.