From 4d5d76cf6381b9f690523c17662ab4b05c2350ae Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Fri, 26 Jun 2020 11:42:24 +0700 Subject: [PATCH] fixed flow navigation --- src/components/flow/Cell/index.tsx | 6 ++- src/components/flow/Cell/styles.scss | 81 ++-------------------------- src/redux/node/sagas.ts | 2 - 3 files changed, 7 insertions(+), 82 deletions(-) diff --git a/src/components/flow/Cell/index.tsx b/src/components/flow/Cell/index.tsx index c687156f..b52d0b16 100644 --- a/src/components/flow/Cell/index.tsx +++ b/src/components/flow/Cell/index.tsx @@ -10,6 +10,7 @@ import { PRESETS } from '~/constants/urls'; import { debounce } from 'throttle-debounce'; import { NODE_TYPES } from '~/redux/node/constants'; import { Group } from '~/components/containers/Group'; +import { Link } from 'react-router-dom'; const THUMBNAIL_SIZES = { horizontal: PRESETS.small_hero, @@ -67,6 +68,7 @@ const Cell: FC = ({ setIsLoaded(true); }, [setIsLoaded]); + // Replaced it with , maybe, you can remove it completely with NodeSelect action const onClick = useCallback(() => onSelect(id, type), [onSelect, id, type]); const has_description = description && description.length > 32; @@ -130,7 +132,7 @@ const Cell: FC = ({ )} -
+
{title && !text &&
{title}
} @@ -150,7 +152,7 @@ const Cell: FC = ({
)}
- + {thumbnail && (
&.has_text, - // .horizontal > &.has_text, - // .quadro > &.has_text { - // box-sizing: border-box; - // background: none; - // box-shadow: none; - // padding: $grid_line; - - // &::after { - // display: none; - // } - - // .face_content { - // padding: $gap; - // background: rgba(25, 25, 25, 0.9); - // border-radius: $radius; - // overflow: hidden; - // position: relative; - - // &:after { - // content: ""; - // background: linear-gradient( - // transparentize($content_bg, 1), - // $content_bg - // ); - // position: absolute; - // bottom: 0; - // left: 0; - // height: 50px; - // width: 100%; - // border-radius: 0 0 $cell_radius $cell_radius; - // } - // } - - // .text::after { - // display: none; - // } - // } - - // .vertical > &.has_text { - // top: auto; - // bottom: 0; - // max-height: 50%; - // max-width: 100%; - // height: auto; - // width: auto; - // padding: ($grid_line / 2) $grid_line $grid_line $grid_line; - // } - - // .horizontal > &.has_text { - // top: auto; - // left: 0; - // height: 100%; - // max-width: 50%; - // // height: auto; - // width: auto; - // bottom: 0; - // padding: $grid_line ($grid_line / 2) $grid_line $grid_line; - // } - - // .quadro > &.has_text { - // padding: ($grid_line / 2) ($grid_line / 2) $grid_line $grid_line; - // top: auto; - // max-height: 50%; - // max-width: 50%; - // height: auto; - // width: auto; - // bottom: 0; - // left: 0; - // } - // } + color: white; + text-decoration: none; } .menu { diff --git a/src/redux/node/sagas.ts b/src/redux/node/sagas.ts index 4a1a0b32..d1bc6412 100644 --- a/src/redux/node/sagas.ts +++ b/src/redux/node/sagas.ts @@ -115,8 +115,6 @@ function* onNodeGoto({ id, node_type }: ReturnType) { yield put(nodeLoadNode(id)); yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT })); yield put(nodeSetRelated(null)); - - yield put(push(URLS.NODE_URL(id))); } function* onNodeLoadMoreComments() {