diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..599a23f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,63 @@ +name: Lint + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - main + pull_request: + branches: + - main + - test + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v3.1.0 + + - name: Set up Node.js + uses: actions/setup-node@v3.5.1 + with: + node-version: 16 + registry-url: "https://npm.pkg.github.com" + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache yarn cache + uses: actions/cache@v3.0.11 + id: cache-yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-dev-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-dev- + + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3.0.11 + with: + path: node_modules + key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-dev-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-dev- + + - name: Install Dependencies + run: yarn install --frozen-lockfile --prefer-offline + + - name: Fix Formatting + run: yarn format + + - name: Check linting + run: yarn lint + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply formatting changes + branch: ${{ github.head_ref }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c87c9b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/README.md b/README.md new file mode 100644 index 0000000..b5d7fd4 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## Online bet nextjs template \ No newline at end of file diff --git a/bootstrap.d.ts b/bootstrap.d.ts new file mode 100644 index 0000000..678a8e2 --- /dev/null +++ b/bootstrap.d.ts @@ -0,0 +1,4 @@ +declare module 'bootstrap/dist/js/bootstrap' { + const bootstrap: any; + export default bootstrap; +} diff --git a/components/BreadCrumb.tsx b/components/BreadCrumb.tsx new file mode 100644 index 0000000..066dc15 --- /dev/null +++ b/components/BreadCrumb.tsx @@ -0,0 +1,34 @@ +import Link from 'next/link'; +import React from 'react'; +type BreadCrumbProps = { + title: string; +}; + +const BreadCrumb = ({ title }: BreadCrumbProps) => { + return ( +
+
+
+

+ {title} +

+
    +
  • + + Home + +
  • +
  • + +
  • +
  • + {title} +
  • +
+
+
+
+ ); +}; + +export default BreadCrumb; \ No newline at end of file diff --git a/components/Layout.tsx b/components/Layout.tsx new file mode 100644 index 0000000..cf5e5e8 --- /dev/null +++ b/components/Layout.tsx @@ -0,0 +1,1465 @@ +import { useTheme } from 'next-themes'; +import Head from 'next/head'; +import Link from 'next/link'; +import { useRouter } from 'next/router'; +import React, { ReactNode, useId, useState } from 'react'; +import Select, { StylesConfig } from 'react-select'; + +interface Option { + value: string; + label: string; +} +const options = [ + { value: 'EN', label: 'EN' }, + { value: 'BN', label: 'BN' }, + { value: 'AR', label: 'AR' }, +]; +const langOptions = [ + { value: 'English', label: 'English' }, + { value: 'Spanish', label: 'Spanish' } +] +const decimalOptions = [ + { value: 'Decimal', label: 'Decimal' }, + { value: 'Odds', label: 'Odds' } +] +type Props = { + children: ReactNode; + // Other props +} +export default function Layout({ children }: Props) { + const { theme, setTheme } = useTheme(); + const [selectedOption, setSelectedOption] = useState