diff --git a/.history/components/Layout_20220709231554.tsx b/.history/components/Layout_20220709231554.tsx new file mode 100644 index 0000000..630867d --- /dev/null +++ b/.history/components/Layout_20220709231554.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { MetaProps } from '../types/layout'; +import Head from './Head'; +import Navigation from './Navigation'; +import ThemeSwitch from './ThemeSwitch'; + +type LayoutProps = { + children: React.ReactNode; + customMeta?: MetaProps; +}; + +export const WEBSITE_HOST_URL = 'https://nextjs-typescript-mdx-blog.vercel.app'; + +const Layout = ({ children, customMeta }: LayoutProps): JSX.Element => { + return ( + <> + +
+
+
+ + +
+
+
+
+
+ {children} +
+
+ + + ); +}; + +export default Layout; diff --git a/.history/components/Layout_20220709231611.tsx b/.history/components/Layout_20220709231611.tsx new file mode 100644 index 0000000..d787cdc --- /dev/null +++ b/.history/components/Layout_20220709231611.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { MetaProps } from '../types/layout'; +import Head from './Head'; +import Navigation from './Navigation'; +import ThemeSwitch from './ThemeSwitch'; + +type LayoutProps = { + children: React.ReactNode; + customMeta?: MetaProps; +}; + +export const WEBSITE_HOST_URL = 'https://nextjs-typescript-mdx-blog.vercel.app'; + +const Layout = ({ children, customMeta }: LayoutProps): JSX.Element => { + return ( + <> + +
+
+
+ + +
+
+
+
+
+ {children} +
+
+ + + ); +}; + +export default Layout; diff --git a/.history/components/Layout_20220709231617.tsx b/.history/components/Layout_20220709231617.tsx new file mode 100644 index 0000000..840ebca --- /dev/null +++ b/.history/components/Layout_20220709231617.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { MetaProps } from '../types/layout'; +import Head from './Head'; +import Navigation from './Navigation'; +import ThemeSwitch from './ThemeSwitch'; + +type LayoutProps = { + children: React.ReactNode; + customMeta?: MetaProps; +}; + +export const WEBSITE_HOST_URL = 'https://nextjs-typescript-mdx-blog.vercel.app'; + +const Layout = ({ children, customMeta }: LayoutProps): JSX.Element => { + return ( + <> + +
+
+
+ + +
+
+
+
+
+ {children} +
+
+ + + ); +}; + +export default Layout; diff --git a/.history/components/Navigation_20220709232346.tsx b/.history/components/Navigation_20220709232346.tsx new file mode 100644 index 0000000..e03cd49 --- /dev/null +++ b/.history/components/Navigation_20220709232346.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import router from 'next/router'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(router.asPath); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709232409.tsx b/.history/components/Navigation_20220709232409.tsx new file mode 100644 index 0000000..b002d61 --- /dev/null +++ b/.history/components/Navigation_20220709232409.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import router from 'next/router'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(item.href); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709232422.tsx b/.history/components/Navigation_20220709232422.tsx new file mode 100644 index 0000000..f77c0f1 --- /dev/null +++ b/.history/components/Navigation_20220709232422.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import router from 'next/router'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709233434.tsx b/.history/components/Navigation_20220709233434.tsx new file mode 100644 index 0000000..83848af --- /dev/null +++ b/.history/components/Navigation_20220709233434.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import router from 'next/router'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709233456.tsx b/.history/components/Navigation_20220709233456.tsx new file mode 100644 index 0000000..4064bb0 --- /dev/null +++ b/.history/components/Navigation_20220709233456.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import router from 'next/router'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709233655.tsx b/.history/components/Navigation_20220709233655.tsx new file mode 100644 index 0000000..788a0ea --- /dev/null +++ b/.history/components/Navigation_20220709233655.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useLocation } from 'react-router-dom'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(useLocation()); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709233709.tsx b/.history/components/Navigation_20220709233709.tsx new file mode 100644 index 0000000..788a0ea --- /dev/null +++ b/.history/components/Navigation_20220709233709.tsx @@ -0,0 +1,98 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useLocation } from 'react-router-dom'; + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + console.log(useLocation()); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709233837.tsx b/.history/components/Navigation_20220709233837.tsx new file mode 100644 index 0000000..ada3d82 --- /dev/null +++ b/.history/components/Navigation_20220709233837.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709233906.tsx b/.history/components/Navigation_20220709233906.tsx new file mode 100644 index 0000000..15347bf --- /dev/null +++ b/.history/components/Navigation_20220709233906.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: true }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709234008.tsx b/.history/components/Navigation_20220709234008.tsx new file mode 100644 index 0000000..af07dab --- /dev/null +++ b/.history/components/Navigation_20220709234008.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709234744.tsx b/.history/components/Navigation_20220709234744.tsx new file mode 100644 index 0000000..9ed56f1 --- /dev/null +++ b/.history/components/Navigation_20220709234744.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709234832.tsx b/.history/components/Navigation_20220709234832.tsx new file mode 100644 index 0000000..00caa8c --- /dev/null +++ b/.history/components/Navigation_20220709234832.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709234914.tsx b/.history/components/Navigation_20220709234914.tsx new file mode 100644 index 0000000..80a1aac --- /dev/null +++ b/.history/components/Navigation_20220709234914.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709235006.tsx b/.history/components/Navigation_20220709235006.tsx new file mode 100644 index 0000000..aef6099 --- /dev/null +++ b/.history/components/Navigation_20220709235006.tsx @@ -0,0 +1,99 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220709235455.tsx b/.history/components/Navigation_20220709235455.tsx new file mode 100644 index 0000000..23f36f0 --- /dev/null +++ b/.history/components/Navigation_20220709235455.tsx @@ -0,0 +1,108 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000148.tsx b/.history/components/Navigation_20220710000148.tsx new file mode 100644 index 0000000..048a6b0 --- /dev/null +++ b/.history/components/Navigation_20220710000148.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000225.tsx b/.history/components/Navigation_20220710000225.tsx new file mode 100644 index 0000000..02aebc3 --- /dev/null +++ b/.history/components/Navigation_20220710000225.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000241.tsx b/.history/components/Navigation_20220710000241.tsx new file mode 100644 index 0000000..9b4aff5 --- /dev/null +++ b/.history/components/Navigation_20220710000241.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000258.tsx b/.history/components/Navigation_20220710000258.tsx new file mode 100644 index 0000000..f5b44cc --- /dev/null +++ b/.history/components/Navigation_20220710000258.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000353.tsx b/.history/components/Navigation_20220710000353.tsx new file mode 100644 index 0000000..e5b9943 --- /dev/null +++ b/.history/components/Navigation_20220710000353.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000408.tsx b/.history/components/Navigation_20220710000408.tsx new file mode 100644 index 0000000..ed2ee5c --- /dev/null +++ b/.history/components/Navigation_20220710000408.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000440.tsx b/.history/components/Navigation_20220710000440.tsx new file mode 100644 index 0000000..5f1f865 --- /dev/null +++ b/.history/components/Navigation_20220710000440.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000532.tsx b/.history/components/Navigation_20220710000532.tsx new file mode 100644 index 0000000..4e3b33c --- /dev/null +++ b/.history/components/Navigation_20220710000532.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000700.tsx b/.history/components/Navigation_20220710000700.tsx new file mode 100644 index 0000000..8a47f58 --- /dev/null +++ b/.history/components/Navigation_20220710000700.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000826.tsx b/.history/components/Navigation_20220710000826.tsx new file mode 100644 index 0000000..76b476c --- /dev/null +++ b/.history/components/Navigation_20220710000826.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000844.tsx b/.history/components/Navigation_20220710000844.tsx new file mode 100644 index 0000000..8a47f58 --- /dev/null +++ b/.history/components/Navigation_20220710000844.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000850.tsx b/.history/components/Navigation_20220710000850.tsx new file mode 100644 index 0000000..6b3ec8e --- /dev/null +++ b/.history/components/Navigation_20220710000850.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710000919.tsx b/.history/components/Navigation_20220710000919.tsx new file mode 100644 index 0000000..ce0d387 --- /dev/null +++ b/.history/components/Navigation_20220710000919.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001008.tsx b/.history/components/Navigation_20220710001008.tsx new file mode 100644 index 0000000..fa0623b --- /dev/null +++ b/.history/components/Navigation_20220710001008.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001155.tsx b/.history/components/Navigation_20220710001155.tsx new file mode 100644 index 0000000..0038c73 --- /dev/null +++ b/.history/components/Navigation_20220710001155.tsx @@ -0,0 +1,112 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001258.tsx b/.history/components/Navigation_20220710001258.tsx new file mode 100644 index 0000000..5b9b0be --- /dev/null +++ b/.history/components/Navigation_20220710001258.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001347.tsx b/.history/components/Navigation_20220710001347.tsx new file mode 100644 index 0000000..73e787a --- /dev/null +++ b/.history/components/Navigation_20220710001347.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001357.tsx b/.history/components/Navigation_20220710001357.tsx new file mode 100644 index 0000000..5b9b0be --- /dev/null +++ b/.history/components/Navigation_20220710001357.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001402.tsx b/.history/components/Navigation_20220710001402.tsx new file mode 100644 index 0000000..79a961e --- /dev/null +++ b/.history/components/Navigation_20220710001402.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001404.tsx b/.history/components/Navigation_20220710001404.tsx new file mode 100644 index 0000000..64b2939 --- /dev/null +++ b/.history/components/Navigation_20220710001404.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001509.tsx b/.history/components/Navigation_20220710001509.tsx new file mode 100644 index 0000000..5d7ab41 --- /dev/null +++ b/.history/components/Navigation_20220710001509.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001559.tsx b/.history/components/Navigation_20220710001559.tsx new file mode 100644 index 0000000..53bf90a --- /dev/null +++ b/.history/components/Navigation_20220710001559.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001626.tsx b/.history/components/Navigation_20220710001626.tsx new file mode 100644 index 0000000..6e09546 --- /dev/null +++ b/.history/components/Navigation_20220710001626.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001656.tsx b/.history/components/Navigation_20220710001656.tsx new file mode 100644 index 0000000..b4c60a9 --- /dev/null +++ b/.history/components/Navigation_20220710001656.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001710.tsx b/.history/components/Navigation_20220710001710.tsx new file mode 100644 index 0000000..05d65fe --- /dev/null +++ b/.history/components/Navigation_20220710001710.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001724.tsx b/.history/components/Navigation_20220710001724.tsx new file mode 100644 index 0000000..53bf90a --- /dev/null +++ b/.history/components/Navigation_20220710001724.tsx @@ -0,0 +1,111 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const [navigation, setNavigation] = useState([ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, + ]); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001827.tsx b/.history/components/Navigation_20220710001827.tsx new file mode 100644 index 0000000..7036caa --- /dev/null +++ b/.history/components/Navigation_20220710001827.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001849.tsx b/.history/components/Navigation_20220710001849.tsx new file mode 100644 index 0000000..fe9de13 --- /dev/null +++ b/.history/components/Navigation_20220710001849.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001931.tsx b/.history/components/Navigation_20220710001931.tsx new file mode 100644 index 0000000..49864d3 --- /dev/null +++ b/.history/components/Navigation_20220710001931.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710001956.tsx b/.history/components/Navigation_20220710001956.tsx new file mode 100644 index 0000000..7e87723 --- /dev/null +++ b/.history/components/Navigation_20220710001956.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002051.tsx b/.history/components/Navigation_20220710002051.tsx new file mode 100644 index 0000000..2c2ebf7 --- /dev/null +++ b/.history/components/Navigation_20220710002051.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002148.tsx b/.history/components/Navigation_20220710002148.tsx new file mode 100644 index 0000000..1f7a7e2 --- /dev/null +++ b/.history/components/Navigation_20220710002148.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002245.tsx b/.history/components/Navigation_20220710002245.tsx new file mode 100644 index 0000000..82a3e35 --- /dev/null +++ b/.history/components/Navigation_20220710002245.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002442.tsx b/.history/components/Navigation_20220710002442.tsx new file mode 100644 index 0000000..c825a72 --- /dev/null +++ b/.history/components/Navigation_20220710002442.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002637.tsx b/.history/components/Navigation_20220710002637.tsx new file mode 100644 index 0000000..82a3e35 --- /dev/null +++ b/.history/components/Navigation_20220710002637.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002709.tsx b/.history/components/Navigation_20220710002709.tsx new file mode 100644 index 0000000..a914ea2 --- /dev/null +++ b/.history/components/Navigation_20220710002709.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002741.tsx b/.history/components/Navigation_20220710002741.tsx new file mode 100644 index 0000000..4b80cf0 --- /dev/null +++ b/.history/components/Navigation_20220710002741.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002810.tsx b/.history/components/Navigation_20220710002810.tsx new file mode 100644 index 0000000..49fbc4b --- /dev/null +++ b/.history/components/Navigation_20220710002810.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002825.tsx b/.history/components/Navigation_20220710002825.tsx new file mode 100644 index 0000000..804f1a6 --- /dev/null +++ b/.history/components/Navigation_20220710002825.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002835.tsx b/.history/components/Navigation_20220710002835.tsx new file mode 100644 index 0000000..49fbc4b --- /dev/null +++ b/.history/components/Navigation_20220710002835.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.query.slug); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002907.tsx b/.history/components/Navigation_20220710002907.tsx new file mode 100644 index 0000000..6f2edbd --- /dev/null +++ b/.history/components/Navigation_20220710002907.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002937.tsx b/.history/components/Navigation_20220710002937.tsx new file mode 100644 index 0000000..e4b1766 --- /dev/null +++ b/.history/components/Navigation_20220710002937.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710002951.tsx b/.history/components/Navigation_20220710002951.tsx new file mode 100644 index 0000000..ae858c3 --- /dev/null +++ b/.history/components/Navigation_20220710002951.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003048.tsx b/.history/components/Navigation_20220710003048.tsx new file mode 100644 index 0000000..10045b5 --- /dev/null +++ b/.history/components/Navigation_20220710003048.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003107.tsx b/.history/components/Navigation_20220710003107.tsx new file mode 100644 index 0000000..de901b0 --- /dev/null +++ b/.history/components/Navigation_20220710003107.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003123.tsx b/.history/components/Navigation_20220710003123.tsx new file mode 100644 index 0000000..64de2ae --- /dev/null +++ b/.history/components/Navigation_20220710003123.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003130.tsx b/.history/components/Navigation_20220710003130.tsx new file mode 100644 index 0000000..de901b0 --- /dev/null +++ b/.history/components/Navigation_20220710003130.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003249.tsx b/.history/components/Navigation_20220710003249.tsx new file mode 100644 index 0000000..56cac6c --- /dev/null +++ b/.history/components/Navigation_20220710003249.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', as: 'true', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', as: 'true', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003320.tsx b/.history/components/Navigation_20220710003320.tsx new file mode 100644 index 0000000..5583549 --- /dev/null +++ b/.history/components/Navigation_20220710003320.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', as: 'true', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', as: 'true', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003333.tsx b/.history/components/Navigation_20220710003333.tsx new file mode 100644 index 0000000..7d10a1e --- /dev/null +++ b/.history/components/Navigation_20220710003333.tsx @@ -0,0 +1,103 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true', current: false }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations', current: true }, + { name: 'Регистрация', href: '/registration', as: 'true', current: false }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule', current: false }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples', current: false }, + { name: 'О нас', href: '/about', as: 'true', current: false }, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + console.log(router.pathname); + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003424.tsx b/.history/components/Navigation_20220710003424.tsx new file mode 100644 index 0000000..6aa3fe4 --- /dev/null +++ b/.history/components/Navigation_20220710003424.tsx @@ -0,0 +1,102 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true' }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations'}, + { name: 'Регистрация', href: '/registration', as: 'true' }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule' }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples'}, + { name: 'О нас', href: '/about', as: 'true'}, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003451.tsx b/.history/components/Navigation_20220710003451.tsx new file mode 100644 index 0000000..57aaff9 --- /dev/null +++ b/.history/components/Navigation_20220710003451.tsx @@ -0,0 +1,106 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true' }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations'}, + { name: 'Регистрация', href: '/registration', as: 'true' }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule' }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples'}, + { name: 'О нас', href: '/about', as: 'true'}, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003536.tsx b/.history/components/Navigation_20220710003536.tsx new file mode 100644 index 0000000..8933456 --- /dev/null +++ b/.history/components/Navigation_20220710003536.tsx @@ -0,0 +1,107 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true' }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations'}, + { name: 'Регистрация', href: '/registration', as: 'true' }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule' }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples'}, + { name: 'О нас', href: '/about', as: 'true'}, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003645.tsx b/.history/components/Navigation_20220710003645.tsx new file mode 100644 index 0000000..ed4d9e2 --- /dev/null +++ b/.history/components/Navigation_20220710003645.tsx @@ -0,0 +1,106 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true' }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations'}, + { name: 'Регистрация', href: '/registration', as: 'true' }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule' }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples'}, + { name: 'О нас', href: '/about', as: 'true'}, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/Navigation_20220710003707.tsx b/.history/components/Navigation_20220710003707.tsx new file mode 100644 index 0000000..ed4d9e2 --- /dev/null +++ b/.history/components/Navigation_20220710003707.tsx @@ -0,0 +1,106 @@ +import Link from 'next/link'; +import React, { useState } from 'react'; +import { MenuIcon, XIcon } from '@heroicons/react/outline' +import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' + +const navigation = [ + { name: 'Главная', href: '/',as: 'true' }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations'}, + { name: 'Регистрация', href: '/registration', as: 'true' }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule' }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples'}, + { name: 'О нас', href: '/about', as: 'true'}, +] + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +const Navigation = (): JSX.Element => { + const [isOpen, setIsOpen] = useState(false); + const router = useRouter() + return ( + + ); +}; + +export default Navigation; diff --git a/.history/components/RegistrationForm_20220709231803.tsx b/.history/components/RegistrationForm_20220709231803.tsx new file mode 100644 index 0000000..d304aaf --- /dev/null +++ b/.history/components/RegistrationForm_20220709231803.tsx @@ -0,0 +1,249 @@ +import React,{useRef} from 'react'; +import { useForm, SubmitHandler } from "react-hook-form"; + +interface IFormInputs { + firstName: string + lastName: string + coach_telefon_number: string + body: string[] +} + +const alerError = (props) => { + return

{props}

+} + +export const RegistrationForm = (props): JSX.Element => { + const form = useRef(null); + const { register, handleSubmit, reset, formState: { errors } } = useForm(); + + const onSubmit: SubmitHandler = data => { + fetch('/api/registration', { method: 'POST', body: JSON.stringify(Object.values(data)) }) + .then(props.updateData(2)) + reset(); + } + return ( + <> +
+
+
+
+

Регистрация команды

+

Введите актуальные данные команды

+

От каждого учебного заведения может быть зарегистрированно неограниченое количеставо команд

+

Подписывайтесь на наш Telegram канал , что-бы быть в курсе новосте про соревнование

+
+
+
+
+
+
+
+
+ + + {errors.name_team_coach && alerError('Введите ФИО тренера команды') } +
+ +
+ + + {errors.coach_telefon_number && alerError('Введите номер телефона')} +
+ +
+ + ()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ })} + placeholder="you@example.com" + className="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" + /> + {errors.trainer_mail && alerError('Введите коректный Email адресс') + } +
+ +
+ + + { errors.city_team && alerError('Введите город команды') } +
+ +
+ + + {errors.training_institution_team && alerError('Введите название учебного заведения') } +
+ +
+ + + {errors.team_name && alerError('Введите название команды') } +
+ +
+ + + {errors.name_first_participant && alerError('Введите ФИО участника') } +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+
+ +
+
+
+
+
+
+ + ); +}; + +export default RegistrationForm; diff --git a/.history/components/ThemeSwitch_20210629061557.tsx b/.history/components/ThemeSwitch_20210629061557.tsx new file mode 100644 index 0000000..8a434c8 --- /dev/null +++ b/.history/components/ThemeSwitch_20210629061557.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'dark'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/components/ThemeSwitch_20220709230720.tsx b/.history/components/ThemeSwitch_20220709230720.tsx new file mode 100644 index 0000000..6682fa4 --- /dev/null +++ b/.history/components/ThemeSwitch_20220709230720.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'light'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/components/ThemeSwitch_20220709230753.tsx b/.history/components/ThemeSwitch_20220709230753.tsx new file mode 100644 index 0000000..8a434c8 --- /dev/null +++ b/.history/components/ThemeSwitch_20220709230753.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'dark'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/components/ThemeSwitch_20220709231131.tsx b/.history/components/ThemeSwitch_20220709231131.tsx new file mode 100644 index 0000000..5592a5e --- /dev/null +++ b/.history/components/ThemeSwitch_20220709231131.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'dark'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/components/ThemeSwitch_20220709231153.tsx b/.history/components/ThemeSwitch_20220709231153.tsx new file mode 100644 index 0000000..8a434c8 --- /dev/null +++ b/.history/components/ThemeSwitch_20220709231153.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'dark'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/components/ThemeSwitch_20220709231218.tsx b/.history/components/ThemeSwitch_20220709231218.tsx new file mode 100644 index 0000000..6682fa4 --- /dev/null +++ b/.history/components/ThemeSwitch_20220709231218.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'light'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/components/ThemeSwitch_20220709231225.tsx b/.history/components/ThemeSwitch_20220709231225.tsx new file mode 100644 index 0000000..8a434c8 --- /dev/null +++ b/.history/components/ThemeSwitch_20220709231225.tsx @@ -0,0 +1,106 @@ +import { useTheme } from 'next-themes'; +import React from 'react'; + +/** + * Based off of gatsby-theme-novela + * https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/src/components/Navigation/Navigation.Header.tsx + */ + +const ThemeSwitch = (): JSX.Element => { + const [mounted, setMounted] = React.useState(false); + const { theme, setTheme } = useTheme(); + + // After mounting, we have access to the theme + React.useEffect(() => setMounted(true), []); + + if (!mounted) { + return null; + } + + const isDark = theme === 'dark'; + const color = isDark ? '#fff' : '#000'; + const maskColor = isDark ? '#000' : '#fff'; + return ( + + ); +}; + +export default ThemeSwitch; diff --git a/.history/pages/_app_20220709231359.tsx b/.history/pages/_app_20220709231359.tsx new file mode 100644 index 0000000..f1ceb3a --- /dev/null +++ b/.history/pages/_app_20220709231359.tsx @@ -0,0 +1,18 @@ +import { ThemeProvider } from 'next-themes'; +import type { AppProps } from 'next/app'; +import React from 'react'; +import { Provider } from 'react-redux'; +import '../styles/globals.css'; +import { store } from '../redux/store'; + +const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => { + return ( + + + + + + ); +}; + +export default MyApp; diff --git a/components/Layout.tsx b/components/Layout.tsx index 007c227..840ebca 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -35,7 +35,7 @@ const Layout = ({ children, customMeta }: LayoutProps): JSX.Element => { className="text-gray-900 dark:text-white" href="https://krasnikov.pro" > - Krasnikov.pro + Krasnikov.pro - {(new Date()).getFullYear()} год diff --git a/components/Navigation.tsx b/components/Navigation.tsx index 7441fe8..ed4d9e2 100644 --- a/components/Navigation.tsx +++ b/components/Navigation.tsx @@ -2,14 +2,15 @@ import Link from 'next/link'; import React, { useState } from 'react'; import { MenuIcon, XIcon } from '@heroicons/react/outline' import { Transition } from "@headlessui/react"; +import { useRouter } from 'next/router' const navigation = [ - { name: 'Главная', href: '/', current: true }, - { name: 'Правила', href: '/posts/[slug]', as:'/posts/regulations', current: false }, - { name: 'Регистрация', href: '/registration', current: false }, - { name: 'Расписание', href: '/posts/[slug]', as:'/posts/festival-schedule', current: false }, - { name: 'Примеры', href: '/posts/[slug]', as:'/posts/task-completion-examples', current: false }, - { name: 'О нас', href: '/about', current: false }, + { name: 'Главная', href: '/',as: 'true' }, + { name: 'Правила', href: '/posts/[slug]', as:'regulations'}, + { name: 'Регистрация', href: '/registration', as: 'true' }, + { name: 'Расписание', href: '/posts/[slug]', as:'festival-schedule' }, + { name: 'Примеры', href: '/posts/[slug]', as:'task-completion-examples'}, + { name: 'О нас', href: '/about', as: 'true'}, ] function classNames(...classes) { @@ -18,6 +19,7 @@ function classNames(...classes) { const Navigation = (): JSX.Element => { const [isOpen, setIsOpen] = useState(false); + const router = useRouter() return (