Skip to content

Commit

Permalink
chore: remove index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
rupali-codes committed Aug 7, 2023
1 parent f28f61d commit 8c92433
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 20 deletions.
1 change: 0 additions & 1 deletion components/BackToTop/index.ts

This file was deleted.

7 changes: 3 additions & 4 deletions components/Cards/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { FC, useState, useRef, useEffect } from 'react'
import { BsBoxArrowUpRight } from 'react-icons/bs'
import { CopyToClipboard } from 'components/CopyToClipboard'
import { Share } from 'components/Share'
import { CopyToClipboard } from 'components/CopyToClipboard/CopyToClipboard'
import Share from 'components/Share/Share'
import type { IData } from 'types'

interface CardProps {
data: IData
}

const Card: FC<CardProps> = ({ data }) => {
export const Card: FC<CardProps> = ({ data }) => {
const { name, description, url } = data
const descriptionRef = useRef<HTMLParagraphElement>(null)
const [isOverflow, setIsOverflow] = useState(false)
Expand Down Expand Up @@ -69,4 +69,3 @@ const Card: FC<CardProps> = ({ data }) => {
)
}

export default Card
4 changes: 2 additions & 2 deletions components/Cards/CardsList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC, useState } from 'react'
import { BackToTopButton } from '../BackToTop/BackToTopButton'
import Popup from 'components/popup'
import { PopupInfo } from 'components/popup/popupInfo'
import CardsListItem from './CardsListItem'
import type { IData } from 'types'

Expand Down Expand Up @@ -29,7 +29,7 @@ const CardsList: FC<{ cards: IData[] }> = ({ cards }) => {
))}
</ul>
<BackToTopButton />
<Popup currentCard={currentCard} onClose={removeCurrentCard} />
<PopupInfo currentCard={currentCard} onClose={removeCurrentCard} />
</>
)
}
Expand Down
2 changes: 1 addition & 1 deletion components/Cards/CardsListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react'
import Card from './Card'
import { Card } from './Card'
import type { IData } from 'types'

const CardsListItem: FC<{ data: IData; onClick: () => void }> = (props) => {
Expand Down
2 changes: 0 additions & 2 deletions components/CopyToClipboard/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ export const CopyToClipboard = ({ url }: CopyToClipboardProps): JSX.Element => {
</div>
)
}

export default CopyToClipboard
1 change: 0 additions & 1 deletion components/CopyToClipboard/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/Searchbar/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/Share/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion components/SideNavbar/SideNavbarBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC } from 'react'
import { Searchbar } from '../Searchbar'
import { Searchbar } from 'components/Searchbar/Searchbar'
import useSidebarSearch from 'hooks/useSidebarSearch'
import classNames from 'classnames'
import { useTheme } from 'next-themes'
Expand Down
1 change: 0 additions & 1 deletion components/SideNavbar/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion components/ThemeToggler/intex.ts

This file was deleted.

5 changes: 2 additions & 3 deletions components/popup/index.tsx → components/popup/popupInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { BsGlobe } from 'react-icons/bs'
import { Backdrop } from 'components/Backdrop/Backdrop'
import { createPortal } from 'react-dom'
import useDelayUnmount from 'hooks/useDelayUnmount'
import { CopyToClipboard } from 'components/CopyToClipboard'
import { CopyToClipboard } from 'components/CopyToClipboard/CopyToClipboard'

const Popup: React.FC<{
export const PopupInfo: React.FC<{
currentCard: IData | null
onClose: () => void
}> = ({ currentCard, onClose }) => {
Expand Down Expand Up @@ -73,4 +73,3 @@ const Popup: React.FC<{
)
}

export default Popup
2 changes: 1 addition & 1 deletion layouts/GeneralLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react'
import { Footer } from 'components/Footer/Footer'
import { SideNavbar } from 'components/SideNavbar'
import { SideNavbar } from 'components/SideNavbar/SideNavbar'
import { Header } from 'components/Header/Header'
import { Aside } from 'components/Aside/Aside'
import { SkipLink } from 'components/SkipLink/SkipLink'
Expand Down

0 comments on commit 8c92433

Please sign in to comment.