Skip to content

Commit

Permalink
chore: hide relocation
Browse files Browse the repository at this point in the history
Nelfimov committed Jan 25, 2024

Verified

This commit was signed with the committer’s verified signature.
Nelfimov Nikita Elfimov
1 parent 26cc23e commit a82f552
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 0 additions & 1 deletion landing/app/src/pages/relocation/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ const GET_NAVIGATION = gql`
query GetNavigation {
navigationItems {
nodes {
id
title
elementsMenu {
externalLink
Original file line number Diff line number Diff line change
@@ -26,6 +26,9 @@ import { useNavigation } from './data'

const Navigation: FC = () => {
const navigation = useNavigation()

const relocationId = ['cG9zdDoxNzgwMA==', 'cG9zdDoxNzc5OQ==']

const [language, setLanguage] = useLanguage()
const { scroll } = useLocomotiveScroll()
const [visible, setVisible] = useState<boolean>(false)
@@ -101,7 +104,7 @@ const Navigation: FC = () => {
</Layout>
<Layout flexGrow={1} flexBasis={[0, 0, 168]} flexShrink={0} />
<Row alignItems='center' justifyContent='flex-start' display={['none', 'none', 'flex']}>
{navigation[language]?.reverse().map(({ title, elementsMenu, content }) => (
{navigation[language]?.filter(item => !relocationId.includes(item.id)).reverse().map(({ title, elementsMenu, content }) => (
<>
<Layout>
<Condition match={elementsMenu?.externalLink !== null}>
9 changes: 7 additions & 2 deletions landing/pages/index-page/src/queries/services.query.ts
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ const GET_SERVICES = gql`
query GetMainServices {
mainServices {
nodes {
id
contentAddons {
image {
altText
@@ -31,13 +32,17 @@ const runServicesQuery = async () => {
query: GET_SERVICES,
})

const relocationId = ['cG9zdDo2MDI=', 'cG9zdDo2MDM=']

const data = servicesData.mainServices.nodes.filter(node => relocationId[0] !== (node.id) && relocationId[1] !== node.id)

if (servicesData) {
return {
services: {
RU: servicesData.mainServices.nodes.filter(
RU: data.filter(
(servicesFragment) => servicesFragment.language.code === 'RU'
),
EN: servicesData.mainServices.nodes.filter(
EN: data.filter(
(servicesFragment) => servicesFragment.language.code === 'EN'
),
},

0 comments on commit a82f552

Please sign in to comment.