Description of funstage-carousel-widget
Arguments and default values:
{The Globalmouth feedwidget is a widget showing sports events from the Kambi Sportsbook API. The events shown are requested from a CMS to determine which events to show. The widget alternates views between live and pre-match events on a sliding animation.
A script tag needs to be included in the page that is going to show the feed-widget:
| export GOPATH=/Users/danielhoffmannbernardes/dev/go | |
| # ZSH stuff | |
| export ZSH=/Users/danielhoffmannbernardes/.oh-my-zsh | |
| ZSH_THEME="robbyrussell" | |
| plugins=( | |
| git | |
| ) | |
| source $ZSH/oh-my-zsh.sh |
| import React, { useContext, useMemo, useState } from 'react'; | |
| interface ExampleContextValue { | |
| value: number; | |
| setValue: (newValue: number) => void; | |
| } | |
| const ExampleContext = React.createContext<ExampleContextValue | undefined>( | |
| undefined, | |
| ); |
| const cwd = process.cwd() | |
| module.exports = function requireResolve(moduleName) { | |
| const resolveOpts = { | |
| paths: [ | |
| // will prefer this folder: | |
| path.resolve(cwd, '..', 'some-dep', 'node_modules'), | |
| // over this folder: | |
| path.resolve(cwd, 'node_modules'), | |
| ], |
| module.exports = { | |
| ignorePatterns: [ | |
| 'config/**/*', | |
| '**/build/**/*', | |
| '**/.yarn/**/*', | |
| '**/artifacts/**/*', | |
| '**/storybook-static/**/*', | |
| '**/node_modules/**/*', | |
| '**/*.config.js', | |
| '**/*rc.js', |
| // used so eslint-plugin-import can properly resolve dependencies using yarn2 | |
| let pnp | |
| try { | |
| pnp = require(`./.pnp.cjs`) | |
| } catch (error) { | |
| // not a problem | |
| } |
| import { Suspense, useEffect, useState } from 'react' | |
| import { ErrorBoundary } from './components/ErrorBoundary' | |
| import { Loader } from './components/Loader' | |
| export function App() { | |
| const [search, setSearch] = useState<string>('') | |
| const [debouncedSearch, setDebouncedSearch] = useState<string>('') | |
| useEffect(() => { | |
| const timeout = setTimeout(() => { |
| import { createBrowserRouter, RouteObject } from 'react-router-dom' | |
| const routes = [ | |
| myRoute1, | |
| myRoute2, | |
| myRoute3, | |
| ] satisfies RouteObject[] | |
| type Route = { |
| type A = { | |
| a: string | |
| b: string | |
| } | |
| const c = { | |
| a: 'a', | |
| b: 'b', | |
| c: 'c' |