This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Teammate} from '@prisma/client'; | |
| import Joi from 'joi'; | |
| import type {NextApiRequest, NextApiResponse} from 'next'; | |
| import {dbClient} from '@/b/db/db-client'; | |
| import {getUserMetadata} from '@/b/utils/get-all-user-metadata'; | |
| import {getSessionOrThrow} from '@/b/utils/get-user-session'; | |
| import {validateSchema} from '@/b/utils/validate-schema'; | |
| const DEFAULT_LIMIT = 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {AxiosInstance, AxiosRequestConfig} from 'axios'; | |
| import { | |
| createContext, | |
| FC, | |
| useCallback, | |
| useContext, | |
| useMemo, | |
| useState, | |
| } from 'react'; | |
| import {queryCache} from 'react-query'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Link from 'next/link'; | |
| export const NextLink: React.FC<{href: string; className?: string}> = ( | |
| props | |
| ) => { | |
| const {href, children, ...rest} = props; | |
| return ( | |
| <Link href={href}> | |
| <a {...rest}>{children}</a> | |
| </Link> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useCallback } from 'react'; | |
| import { Link } from 'gatsby'; | |
| import styled from '@emotion/styled'; | |
| import tw from 'tailwind.macro'; | |
| const Dropdown = styled.div` | |
| ${tw`w-full flex-grow lg:flex lg:items-center lg:justify-end lg:w-auto`} | |
| `; | |
| const NavLinks = () => ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import List from './TournamentsList' | |
| import Single from './Tournament' | |
| import tournamentRoutes from './Tournament/routes' | |
| export default [ | |
| { | |
| path: '', | |
| name: 'tournaments-list', | |
| component: List, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Overview from './TournamentOverview' | |
| import Participants from './TournamentParticipants' | |
| import Settings from './TourmamentSettings' | |
| export default [ | |
| { | |
| path: '', | |
| name: 'tournament-overview', | |
| component: Overview, | |
| meta: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Tennis/ | |
| Friendly/ | |
| _routes.js | |
| .. | |
| Lessons/ | |
| _routes.js | |
| .. | |
| Tournaments/ | |
| Tournament/ | |
| _routes.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| router.beforeEach((to, from, next) => { | |
| if ( !to.meta.requiresAuth || store.state.user.authenticated){ | |
| next(); | |
| } | |
| else{ | |
| next({ name: 'landing' }) | |
| } | |
| }) | |
| // { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as dropdowns from 'utils/api/dropdowns' | |
| // ... | |
| async getMemberCategories ({ commit }, params) { | |
| const response = await dropdowns.requestMemberSubscriptions(params) | |
| commit('setMemberCategories', response.data) | |
| } | |
| // .. |
NewerOlder