Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AjayKanniyappan/nextjs-pwa-template
/ functions
Functions
52 in github.com/AjayKanniyappan/nextjs-pwa-template
⨍
Functions
52
◇
Types & classes
10
↓ 3 callers
Method
get
(path: string, config?: AxiosRequestConfig)
src/services/ApiClient.ts:14
↓ 2 callers
Function
getImages
* It makes a GET request to the Cat Image API, and returns the response data if the request is * successful * @param {string} path - The path to the
src/services/images.service.ts:15
↓ 1 callers
Function
carouselInfiniteScroll
()
src/components/breeds/Carousel.tsx:22
↓ 1 callers
Function
getBreeds
* It returns a promise that resolves to an object of type `cat.Breeds` or rejects with an error * @param {string} path - string - the path to the API
src/services/breeds.service.ts:14
↓ 1 callers
Function
getFacts
* It makes a GET request to the Cat Facts API, and returns the response data if the request is * successful * @param {string} path - The path to the
src/services/facts.service.ts:15
↓ 1 callers
Function
handleWindowResize
()
src/hooks/useDeviceSize.ts:14
↓ 1 callers
Function
nextSlide
()
src/components/breeds/Carousel.tsx:33
↓ 1 callers
Function
prevSlide
()
src/components/breeds/Carousel.tsx:38
↓ 1 callers
Function
randomNumber
* This function takes in two numbers, min and max, and returns a random number between those two * numbers. * @param {number} min - The minimum numb
src/utils/randomNumber.tsx:8
↓ 1 callers
Function
setCurrentSlide
(index: number)
src/components/breeds/Carousel.tsx:29
↓ 1 callers
Function
useDeviceSize
* "useDeviceSize returns true if the window width is less than or equal to the size parameter." * * The function uses the useState hook to store the
src/hooks/useDeviceSize.ts:11
Function
App
({ Component, pageProps }: AppProps)
src/pages/_app.tsx:4
Function
BackArrowSvg
({ className }: cat.Svg)
src/svg/BackArrowSvg.tsx:6
Function
BottomNav
* It's a React component that renders a bottom navigation bar with links to the home page, the facts * page, and the breeds page. * It maps over the
src/components/BottomNav.tsx:13
Function
BreedCard
* BreedCard is a function that returns a JSX element. * @returns A JSX.Element
src/components/breeds/BreedCard.tsx:15
Function
BreedSvg
({ className }: cat.Svg)
src/svg/BreedSvg.tsx:6
Function
BuyMeaCoffee
* It renders a link to my Buy Me a Coffee page, with a coffee cup SVG inside it * @returns A div with a link to buy me a coffee.
src/components/BuyMeaCoffee.tsx:10
Function
BuyMeaCoffeeSvg
({ className }: cat.Svg)
src/svg/BuyMeaCoffeeSvg.tsx:6
Function
Carousel
* It's a React component that renders a carousel of images * @param event - The event object
src/components/breeds/Carousel.tsx:13
Function
CatFourOFourSvg
({ className }: cat.Svg)
src/svg/CatFourOFourSvg.tsx:6
Function
CatLogoSvg
({ className }: cat.Svg)
src/svg/CatLogoSvg.tsx:6
Function
CrossSvg
({ className }: cat.Svg)
src/svg/CrossSvg.tsx:6
Function
Details
* It returns a JSX element that displays the details of the current breed * @param - cat.DetailsProps * @returns JSX.Element
src/components/breeds/Details.tsx:13
Function
Document
()
src/pages/_document.tsx:4
Function
ExternalSvg
({ className }: cat.Svg)
src/svg/ExternalSvg.tsx:6
Function
FactCard
* @param - cat.Count * @returns A React component that displays a random cat image and facts.
src/components/facts/FactCard.tsx:12
Function
FactSvg
({ className }: cat.Svg)
src/svg/FactSvg.tsx:6
Function
Footer
* It returns a footer with a link to my website * @returns JSX.Element
src/components/Footer.tsx:10
Function
FourOFour
()
src/pages/404.tsx:10
Function
Header
* It returns a header element with a logo, a title, and a navigation bar * @returns A JSX element
src/components/Header.tsx:10
Function
Home
()
src/components/Home.tsx:5
Function
HomeSvg
({ className }: cat.Svg)
src/svg/HomeSvg.tsx:6
Function
Meta
* It returns a bunch of meta tags that are used by the browser to display the app in the browser * @returns A React element.
src/components/Meta.tsx:5
Function
NavBar
* It's a function that returns a Navbar * @returns A JSX element
src/components/NavBar.tsx:11
Function
Page
* It's a React component that renders a page with a header, footer, and bottom navigation * @param - title - The title of the page. * @returns A Re
src/layouts/Page.tsx:9
Function
RandomImage
* It fetches a random image from thecatapi.com and displays it * @param - cat.Count * @returns A React component that displays a random cat image.
src/components/facts/RandomImage.tsx:13
Function
Ratings
* It's a React component that takes a count prop and returns a JSX element. * function Ratings({ count }: cat.RatingsProps): JSX * @param - cat.Rat
src/components/breeds/Ratings.tsx:9
Function
Section
* A React component that renders a section element. * @param - `className` - the class name of the section * @returns A React component
src/layouts/Section.tsx:6
Function
Select
* It's a React component that renders a select element with a label and a list of options * @param - cat.SelectProps * @returns A JSX element
src/components/breeds/Select.tsx:8
Function
StarSvg
({ className }: cat.Svg)
src/svg/StarSvg.tsx:6
Function
Toasts
* It returns a span element that contains a div element if the toast state is true and the type is * danger-toast * @param - `message` - The messag
src/components/Toasts.tsx:10
Function
WikipediaSvg
* It returns a React component that renders an SVG * @param - `className` - the class name to apply to the SVG element. * @returns A JSX element.
src/svg/WikipediaSvg.tsx:6
Function
breeds
()
src/pages/breeds.tsx:5
Method
constructor
(baseURL: string, headers: cat.Headers)
src/services/ApiClient.ts:6
Function
facts
()
src/pages/facts.tsx:5
Function
handleClose
()
src/components/Toasts.tsx:11
Function
handleSelectChange
(event: React.ChangeEvent<HTMLSelectElement>)
src/components/breeds/BreedCard.tsx:35
Function
handleTouchEnd
()
src/components/breeds/Carousel.tsx:78
Function
handleTouchMove
(event: React.TouchEvent)
src/components/breeds/Carousel.tsx:74
Function
handleTouchStart
(event: React.TouchEvent)
src/components/breeds/Carousel.tsx:70
Function
handler
(_req: NextApiRequest, res: NextApiResponse<cat.Data>)
src/pages/api/index.ts:10
Function
main
()
src/pages/index.tsx:5