diff --git a/app/(user)/blank.tsx b/app/(user)/blank.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/app/layout.tsx b/app/layout.tsx index a32b253..2516b1d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,8 +1,13 @@ +'use client'; +import Header from '@/components/layouts/Header' import './globals.css' import type { Metadata } from 'next' -import { Inter } from 'next/font/google' +import Footer from '@/components/layouts/Footer' +import { ReduxProvider } from '@/redux/provider'; +import NavBar from '@/components/layouts/NavBar'; +import { THEME } from '@/styles/theme'; +import { MAIN_FONT } from '@/styles/fonts'; -const inter = Inter({ subsets: ['latin'] }) export const metadata: Metadata = { title: 'UETable', @@ -16,7 +21,18 @@ export default function RootLayout({ }) { return ( - {children} + + +
+ +
+
+ {children} +
+
+
+ ) } diff --git a/app/loading.tsx b/app/loading.tsx new file mode 100644 index 0000000..5b881fd --- /dev/null +++ b/app/loading.tsx @@ -0,0 +1,9 @@ +'use client'; + +export default function Loading() { + return ( +
+

Loading

+
+ ); +} diff --git a/app/page.tsx b/app/page.tsx index 7a8286b..7d79ebb 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,8 +1,10 @@ import Image from 'next/image' +import { Inter } from 'next/font/google' +const inter = Inter({ subsets: ['latin'] }) export default function Home() { return ( -
+

Get started by editing  @@ -111,3 +113,9 @@ export default function Home() {

) } + +// export default function Home() { +// return ( +//
+// ) +// } diff --git a/app/signin/page.tsx b/app/signin/page.tsx new file mode 100644 index 0000000..18db1ae --- /dev/null +++ b/app/signin/page.tsx @@ -0,0 +1,7 @@ +import React from 'react' + +export default function SignIn() { + return ( +
SignIn
+ ) +} diff --git a/app/signup/page.tsx b/app/signup/page.tsx new file mode 100644 index 0000000..e3770de --- /dev/null +++ b/app/signup/page.tsx @@ -0,0 +1,7 @@ +import React from 'react' + +export default function SignUp() { + return ( +
SignUp
+ ) +} diff --git a/components/blank.tsx b/components/blank.tsx deleted file mode 100644 index e69de29..0000000 diff --git a/components/common/SearchBar.tsx b/components/common/SearchBar.tsx new file mode 100644 index 0000000..e27d433 --- /dev/null +++ b/components/common/SearchBar.tsx @@ -0,0 +1,19 @@ +import { Input } from 'antd' +import React from 'react' +import { BiSearchAlt } from "react-icons/bi"; + +export default function SearchBar({ + onSearch +}: { + onSearch: (value: string) => void +}): React.JSX.Element { + return ( + + ) +} diff --git a/components/layouts/Footer.tsx b/components/layouts/Footer.tsx new file mode 100644 index 0000000..7b711ee --- /dev/null +++ b/components/layouts/Footer.tsx @@ -0,0 +1,23 @@ +import Image from 'next/image' +import React from 'react' +import UETLogo from '../../public/images/uet-logo.svg'; +import { THEME } from '@/styles/theme'; + +export default function Footer() { + return ( +
+
+
+
+ uet-logo +
+
+ Trường Đại học Công nghệ, Đại học Quốc gia Hà Nội +
+
Nhà E3, 144 Xuân Thuỷ, Cầu Giấy, Hà Nội
+
+
+
+
+ ) +} diff --git a/components/layouts/Header.tsx b/components/layouts/Header.tsx new file mode 100644 index 0000000..0132384 --- /dev/null +++ b/components/layouts/Header.tsx @@ -0,0 +1,152 @@ +"use client"; + +import { THEME } from "@/styles/theme"; +import React, { ReactNode, useState } from "react"; +import { useDispatch, useSelector } from "react-redux"; +import { authActions } from "@/redux/auth/authSlice"; +import { authSelector } from "@/redux/auth/authSelector"; +import { Avatar, Badge, Select } from "antd"; +import { IoNotificationsOutline, IoNotifications } from "react-icons/io5"; +import SearchBar from "../common/SearchBar"; +import Link from "next/link"; +import { MAIN_FONT } from "@/styles/fonts"; + +const languages = ['Tiếng Việt', 'English']; + + +interface TabProps { + selected: boolean; + children: ReactNode; +} + +const Tab: React.FC = ({ selected, children }: TabProps) => { + const [hover, setHover] = useState(false); + + return ( + + ); +}; + +export default function Header() { + const dispatch = useDispatch(); + const authState = useSelector(authSelector); + const [avtURL, setAvtURL] = useState('https://yt3.googleusercontent.com/-CFTJHU7fEWb7BYEb6Jh9gm1EpetvVGQqtof0Rbh-VQRIznYYKJxCaqv_9HeBcmJmIsp2vOO9JU=s900-c-k-c0x00ffffff-no-rj') + const [avtStrokeColor, setAvtStrokeColor] = useState(THEME.PRIMARY_COLOR); + const [notiCount, setNotiCount] = useState(10) + + const handleSignIn = (): void => { + dispatch(authActions.updateAuthState({ + signedIn: true, + username: "21020059", + name: "Bùi Huy Dược" + })) + }; + + const handleSignOut = (): void => { + dispatch(authActions.updateAuthState({ + signedIn: false + })) + }; + + const handleOnSearch = (value: string): void => { + console.log(value) + } + + return ( +
+ {/* */} +
+ +
+