diff --git a/src/components/flow/Cell/styles.scss b/src/components/flow/Cell/styles.scss index 65ea50de..311728ab 100644 --- a/src/components/flow/Cell/styles.scss +++ b/src/components/flow/Cell/styles.scss @@ -100,7 +100,7 @@ .is_text { background: none; padding: 10px; - box-shadow: inset #444 0 0 0 1px; + box-shadow: inset $cell_shade 0 0 0 1px; } .thumbnail { diff --git a/src/components/flow/FlowHero/index.tsx b/src/components/flow/FlowHero/index.tsx index bfed6809..b9350b55 100644 --- a/src/components/flow/FlowHero/index.tsx +++ b/src/components/flow/FlowHero/index.tsx @@ -1,4 +1,4 @@ -import React, { FC, useState, useCallback, useEffect, useRef } from 'react'; +import React, { FC, useState, useCallback, useEffect, useRef, useMemo } from 'react'; import { IFlowState } from '~/redux/flow/reducer'; import classNames from 'classnames'; @@ -70,22 +70,34 @@ const FlowHeroUnconnected: FC = ({ heroes, history }) => { history.push(URLS.NODE_URL(current)); }, [current]); + const title = useMemo(() => { + if (loaded.length === 0) return null; + + const item = heroes.find(hero => hero.id === current); + + if (!item || !item.title) return null; + + return item.title; + }, [loaded, current, heroes]); + return (
-
-
-
TITLE!
-
+ {loaded && loaded.length > 0 && ( +
+
+
{title}
+
-
-
- -
-
- +
+
+ +
+
+ +
-
+ )} {heroes.slice(0, limit).map(hero => (