Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
refactor: rename navlink to navlinkitem in navigation section
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirved64 committed Sep 11, 2023
1 parent 62d1933 commit 95680bb
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { Scrollspy } from '@makotot/ghostui'

import React from 'react'
import { FC } from 'react'
import { FormattedMessage } from 'react-intl'

import { Background } from '@ui/background'
import { Button } from '@ui/button'
import { Card } from '@ui/card'
import { Condition } from '@ui/condition'
import { DrawerContainer } from '@ui/drawer'
import { ArrowUpIcon } from '@ui/icons'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Row } from '@ui/layout'
import { Logo } from '@ui/logo'
import { Text } from '@ui/text'

import { CardDataDesktop } from '../data'
import { NavLinks } from '../data'
import { NavLinkDrawer } from '../navlink'
import { DrawerProps } from './drawer.interfaces'
import { Scrollspy } from '@makotot/ghostui'

import React from 'react'
import { FC } from 'react'
import { FormattedMessage } from 'react-intl'

import { Background } from '@ui/background'
import { Button } from '@ui/button'
import { Card } from '@ui/card'
import { Condition } from '@ui/condition'
import { DrawerContainer } from '@ui/drawer'
import { ArrowUpIcon } from '@ui/icons'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Row } from '@ui/layout'
import { Logo } from '@ui/logo'
import { Text } from '@ui/text'

import { CardDataDesktop } from '../data'
import { NavLinks } from '../data'
import { NavLinkItemDrawer } from '../navlink-item'
import { DrawerProps } from './drawer.interfaces'

export const DrawerDesktop: FC<DrawerProps> = ({ active, onClose, sectionRefs }) => {
const cardsList = Array.from({ length: 3 }, () => CardDataDesktop).map((el, index) => ({
Expand Down Expand Up @@ -78,7 +78,7 @@ export const DrawerDesktop: FC<DrawerProps> = ({ active, onClose, sectionRefs })
<Box>
{NavLinks.map((navLink, index) => (
<Box key={navLink.id} width={index < NavLinks.length - 1 ? 220 : 200}>
<NavLinkDrawer
<NavLinkItemDrawer
path={navLink.path}
name={navLink.name}
currentElementIndexInViewport={currentElementIndexInViewport}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Text } from '@ui/text'
import { NavLinks } from './data'
import { DrawerDesktop } from './drawer'
import { NavigationProps } from './navigation.interfaces'
import { NavLink } from './navlink'
import { NavLinkItem } from './navlink-item'

export const NavigationDesktop: FC<NavigationProps> = ({ sectionRefs }) => {
const [active, setActive] = useState<boolean>(false)
Expand All @@ -35,7 +35,7 @@ export const NavigationDesktop: FC<NavigationProps> = ({ sectionRefs }) => {

{NavLinks.map((navLink, index) => (
<Box key={navLink.id} width={index < NavLinks.length - 1 ? 220 : 200}>
<NavLink name={navLink.name} path={navLink.path} />
<NavLinkItem name={navLink.name} path={navLink.path} />

<Condition match={index < NavLinks.length - 1}>
<Layout flexBasis={20} />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './navlink-item.component'
export * from './navlink-item-drawer.component'
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from 'react'
import { FC } from 'react'
import { Link } from 'react-scroll'
import React from 'react'
import { FC } from 'react'
import { Link } from 'react-scroll'

import { Condition } from '@ui/condition'
import { Divider } from '@ui/divider'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Text } from '@ui/text'
import { useHover } from '@ui/utils'
import { Condition } from '@ui/condition'
import { Divider } from '@ui/divider'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Text } from '@ui/text'
import { useHover } from '@ui/utils'

import { NavLinkDrawerProps } from './navlink.interfaces'
import { NavLinkItemDrawerProps } from './navlink-item.interfaces'

export const NavLinkDrawer: FC<NavLinkDrawerProps> = ({
export const NavLinkItemDrawer: FC<NavLinkItemDrawerProps> = ({
name,
path,
currentElementIndexInViewport,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react'
import { FC } from 'react'
import { Link } from 'react-scroll'
import React from 'react'
import { FC } from 'react'
import { Link } from 'react-scroll'

import { Divider } from '@ui/divider'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Text } from '@ui/text'
import { useHover } from '@ui/utils'
import { Divider } from '@ui/divider'
import { Box } from '@ui/layout'
import { Column } from '@ui/layout'
import { Layout } from '@ui/layout'
import { Text } from '@ui/text'
import { useHover } from '@ui/utils'

import { NavLinkProps } from './navlink.interfaces'
import { NavLinkItemProps } from './navlink-item.interfaces'

export const NavLink: FC<NavLinkProps> = ({ name, path }) => {
export const NavLinkItem: FC<NavLinkItemProps> = ({ name, path }) => {
const { hover, hoverProps } = useHover()

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export interface NavLinkProps {
export interface NavLinkItemProps {
name: string
path: string
}

export interface NavLinkDrawerProps {
export interface NavLinkItemDrawerProps {
name: string
path: string
currentElementIndexInViewport: number
Expand Down
2 changes: 0 additions & 2 deletions landing/fragments/landing-navigation/src/navlink/index.ts

This file was deleted.

0 comments on commit 95680bb

Please sign in to comment.