Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
KimCookieYa committed Aug 11, 2024
1 parent db528c2 commit 13fc515
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 15 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@next/third-parties": "^14.2.5",
"axios": "^1.6.7",
"next": "14.1.0",
"react": "^18",
Expand Down
8 changes: 4 additions & 4 deletions src/app/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default function SugangLayout({
children: React.ReactNode;
}>) {
return (
<>
<div className={'scroll-hidden overflow-y-auto'}>
<SugangHeader />
<div className="flex">
<div className="flex scroll-hidden">
<SugangSidebar />
<main className="p-16 w-full">{children}</main>
<main className="p-16 w-full scroll-hidden">{children}</main>
</div>
</>
</div>
);
}
2 changes: 1 addition & 1 deletion src/app/(main)/notice/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import NoticeSection1 from "@/components/notice/NoriceSection1";

export default function NoticePage() {
return (
<div className="w-full h-full flex flex-col gap-y-8 items-center">
<div className="w-full h-full flex flex-col gap-y-8 items-center scroll-hidden">
<NoticeSection1 />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SugangSearchBar from "@/components/sugang/SugangSearchBar";

export default function RegisterPage() {
return (
<div className="w-full h-full flex flex-col gap-y-8">
<div className="w-full h-full flex flex-col gap-y-8 scroll-hidden">
<SugangSearchBar />
<div className="p-0">
<SugangNavbarMenu />
Expand Down
9 changes: 9 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@
body {
font-family: "Pretendard-Regular";
}

.scroll-hidden {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}

.scroll-hidden::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}
10 changes: 7 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {Metadata} from 'next';
import './globals.css';
import LoadingModal from '@/components/LoadingModal';
import {URL_DATA} from '@/constants/url';
import { GoogleTagManager, GoogleAnalytics } from '@next/third-parties/google'


export const metadata: Metadata = {
Expand All @@ -12,7 +13,7 @@ export const metadata: Metadata = {
openGraph: {
title: '부산대학교 수강신청시스템 아님',
description: '부산대학교의 수강신청을 연습할 수 있는 모의 수강신청 서비스',
siteName: '센디 드라이버',
siteName: '부산대학교 수강신청시스템 아님',
url: URL_DATA.APP_URL,
type: 'website',
images: [{
Expand All @@ -23,6 +24,7 @@ export const metadata: Metadata = {
},
robots: {
index: true,
follow: true,
},

};
Expand All @@ -34,8 +36,10 @@ export default function RootLayout({
}>) {
return (
<html lang="ko">
<body>
<div id="root" className="relative">
<GoogleTagManager gtmId="GTM-5H9CPNK9" />
<GoogleAnalytics gaId="G-N92PJFD121" />
<body className={'relative'}>
<div id="root" className={'scroll-hidden'}>
{children}
</div>
<div id="modal-root"/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Home() {
return (
<>
<HomeHeader />
<main className="flex min-h-screen flex-col p-16 items-center gap-y-20">
<main className="flex min-h-screen flex-col p-16 items-center gap-y-20 scroll-hidden">
<h2 className="text-3xl font-bold text-pnuText mt-32 text-center">
2024학년도 <br className='hidden md:block' />1학기 수강신청
</h2>
Expand Down
5 changes: 5 additions & 0 deletions src/components/notice/NoriceSection1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import useLoading from "@/stores/loading";
import { generateRandomDelay } from "@/utils/util";
import { useRouter } from "next/navigation";
import { Fragment, useState } from "react";
import { sendGAEvent } from '@next/third-parties/google'

export default function NoticeSection1() {
const router = useRouter();
Expand All @@ -22,6 +23,10 @@ export default function NoticeSection1() {
const handleClick = (e: React.MouseEvent) => {
e.preventDefault();
setIsLoading(true);
sendGAEvent({
event: 'buttonClicked',
value: 'click-register-button',
});
setTimeout(() => {
setIsLoading(false);
router.push("/register");
Expand Down
5 changes: 5 additions & 0 deletions src/components/sugang/SubjectSearchResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import useLocalStorage from "@/hooks/useLocalStorage";
import useLoading from "@/stores/loading";
import useAlert from "@/stores/alert";
import { TCell, THead } from "../Table";
import { sendGAEvent } from '@next/third-parties/google'

export function SubjectSearchResult() {
const pathname = usePathname();
Expand All @@ -16,6 +17,10 @@ export function SubjectSearchResult() {
const { setMessage } = useAlert();

const onSaveSubject = (subject: SubjectType) => {
sendGAEvent({
event: 'buttonClicked',
value: pathname === "/register" ? 'register-subject' : 'register-desired-subject',
});
setIsLoading(true);
setTimeout(() => {
setValue([...storedValue, subject]);
Expand Down
8 changes: 7 additions & 1 deletion src/components/sugang/SubjectSearchSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import { MdOutlineRadioButtonUnchecked } from "react-icons/md";
import { readExcelData } from "@/utils/excel";
import { filterData } from "@/utils/filter";
import { SubjectSearchResult } from "@/components/sugang/SubjectSearchResult";
import {useEffect, useState} from 'react';
import {useState} from 'react';
import useAlert from "@/stores/alert";
import { cls } from "@/utils/util";
import { sendGAEvent } from '@next/third-parties/google'


export default function SubjectSearchSection({
visible,
Expand All @@ -20,6 +22,10 @@ export default function SubjectSearchSection({
const { type, data } = useAlert();

const onClickQuery = async () => {
sendGAEvent({
event: 'buttonClicked',
value: 'click-search-button',
});
const data = await readExcelData("/sugang-data-20240124.xlsx");
setSubjectValues(filterData(data, filter));
};
Expand Down
6 changes: 6 additions & 0 deletions src/components/sugang/SugangSearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { readExcelData } from "@/utils/excel";
import { generateRandomDelay } from "@/utils/util";
import { usePathname } from "next/navigation";
import {useEffect, useRef} from 'react';
import { sendGAEvent } from '@next/third-parties/google'


export default function SugangSearchBar() {
const pathname = usePathname();
Expand All @@ -21,6 +23,10 @@ export default function SugangSearchBar() {
}, []);

const onSubmitInput = async () => {
sendGAEvent({
event: 'buttonClicked',
value: 'click-guick-register-button',
});
const data = await readExcelData("/sugang-data-20240124.xlsx");
const courseCode = courseCodeRef.current?.value;
const courseRoomId = courseRoomIdRef.current?.value;
Expand Down
34 changes: 30 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@
resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.0.tgz#e561fb330466d41807123d932b365cf3d33ceba2"
integrity sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg==

"@next/third-parties@^14.2.5":
version "14.2.5"
resolved "https://registry.yarnpkg.com/@next/third-parties/-/third-parties-14.2.5.tgz#7161d266547cabfb61b8af9721f83f8b5463a572"
integrity sha512-PDRJm8RZ3rnGNporHKjcdCeZqoW8iJ5uP0clo1Z08TqJiQzuntJ66zrGYCJyqTakx62UJNOp73YsQCFo6kbYYg==
dependencies:
third-party-capital "1.0.20"

"@nodelib/[email protected]":
version "2.1.5"
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
Expand Down Expand Up @@ -2442,8 +2449,16 @@ streamsearch@^1.1.0:
resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
name string-width-cjs
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0:
version "4.2.3"
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -2503,8 +2518,14 @@ string.prototype.trimstart@^1.0.7:
define-properties "^1.2.0"
es-abstract "^1.22.1"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
name strip-ansi-cjs
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -2632,6 +2653,11 @@ thenify-all@^1.0.0:
dependencies:
any-promise "^1.0.0"

[email protected]:
version "1.0.20"
resolved "https://registry.yarnpkg.com/third-party-capital/-/third-party-capital-1.0.20.tgz#e218a929a35bf4d2245da9addb8ab978d2f41685"
integrity sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==

to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
Expand Down

0 comments on commit 13fc515

Please sign in to comment.