Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
"extends": "next/core-web-vitals"
}
10 changes: 4 additions & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"useTabs": true,
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": [
"prettier-plugin-tailwindcss"
],
"tailwindConfig": "./tailwind.config.ts",
"tailwindFunctions": ["clsx"]
"plugins": ["prettier-plugin-tailwindcss"],
"tailwindConfig": "./tailwind.config.ts",
"tailwindFunctions": ["clsx"]
}
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{
}
{}
8 changes: 4 additions & 4 deletions app/company/(overview)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { CompanyOverviewCard } from '@/app/ui/company/CompanyOverviewCard';
import { BsThreeDots } from 'react-icons/bs';
import { PaginationButtons } from '@/app/ui/paging/Pagination';
import { CompanyOverviewCard } from '@/app/ui/company/CompanyOverviewCard';
import Container from '@/app/ui/common/container';
import FeedBackBtn from '@/app/ui/common/feedBackBtn';
import { Metadata } from 'next';
import { PaginationButtons } from '@/app/ui/paging/Pagination';
import ScrollToTop from '@/app/ui/common/ScrollToTop';
import Container from '@/app/ui/common/container';
import { fetchCompanyData } from '../../lib/server/queries/company';
import FeedBackBtn from '@/app/ui/common/feedBackBtn';

const PAGE_SIZE = 10;

Expand Down
9 changes: 3 additions & 6 deletions app/company/[id]/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import NotFound from "@/app/not-found";
import NotFound from '@/app/not-found';

export default function Page() {
return (
<NotFound/>
);
}

return <NotFound />;
}
9 changes: 3 additions & 6 deletions app/company/[id]/suggestion/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import NotFound from "@/app/not-found";
import NotFound from '@/app/not-found';

export default function Page() {
return (
<NotFound/>
);
}

return <NotFound />;
}
29 changes: 15 additions & 14 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
html, body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
html,
body {
height: 100%;
margin: 0;
padding: 0;
overflow-y: auto;
}

#__next {
height: 100%;
height: 100%;
}

.full-height-container {
height: 100%;
height: 100%;
}

.full-page-container {
height: 100%;
overflow-y: auto;
scroll-snap-type: y mandatory;
height: 100%;
overflow-y: auto;
scroll-snap-type: y mandatory;
}

.full-page-section {
height: 100%;
scroll-snap-align: start;
scroll-snap-stop: always;
height: 100%;
scroll-snap-align: start;
scroll-snap-stop: always;
}

html {
scroll-behavior: smooth;
scroll-behavior: smooth;
}
16 changes: 10 additions & 6 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import type { Metadata } from 'next';
import localFont from 'next/font/local';
import './ui/global.css';
import Topnav from './ui/navigation/topNav';

import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';

import AdminPageLayout from '@/app/admin/components/admin-page-layout';
import Footer from './ui/common/Footer';
import LastPathSetter from './ui/common/lastPathSetter';
import type { Metadata } from 'next';
import PrelineScript from './ui/common/PrelineScript';
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
import Script from 'next/script';
import Footer from './ui/common/Footer';
import ScrollbarHandler from './ui/common/ScrollbarHandler';
import Topnav from './ui/navigation/topNav';
import { headers } from 'next/headers';
import AdminPageLayout from '@/app/admin/components/admin-page-layout';
import localFont from 'next/font/local';

const pretendard = localFont({
src: '../public/fonts/PretendardVariable.woff2',
Expand All @@ -35,6 +38,7 @@ export default function RootLayout({
/>
<GoogleTagManager gtmId="GTM-57ML2L7S" />
<body className={`${pretendard.className}`}>
<ScrollbarHandler />
<LastPathSetter />
<Topnav />
<AdminPageLayout></AdminPageLayout>
Expand Down
30 changes: 15 additions & 15 deletions app/lib/context/GoogleAnalytics.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import Script from "next/script";
import Script from 'next/script';

export default function GoogleAnalytics(){
return(
<>
<Script async src="https://www.googletagmanager.com/gtag/js?id=G-9PG6DER9G1"></Script>
<Script
id="google-analytics"
dangerouslySetInnerHTML={{
__html: `
export default function GoogleAnalytics() {
return (
<>
<Script async src="https://www.googletagmanager.com/gtag/js?id=G-9PG6DER9G1"></Script>
<Script
id="google-analytics"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9PG6DER9G1');
`,
}}
>
</Script></>
)
}
`
}}
></Script>
</>
);
}
26 changes: 13 additions & 13 deletions app/lib/hooks/use-mobile.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import * as React from "react"
import * as React from 'react';

const MOBILE_BREAKPOINT = 768
const MOBILE_BREAKPOINT = 768;

export function useIsMobile() {
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined);

React.useEffect(() => {
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
const onChange = () => {
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
}
mql.addEventListener("change", onChange)
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
return () => mql.removeEventListener("change", onChange)
}, [])
React.useEffect(() => {
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
const onChange = () => {
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
};
mql.addEventListener('change', onChange);
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
return () => mql.removeEventListener('change', onChange);
}, []);

return !!isMobile
return !!isMobile;
}
1 change: 0 additions & 1 deletion app/lib/types/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ export * from './user';
export * from './admin';
export * from './company';
export * from './datalab';

44 changes: 20 additions & 24 deletions app/login/fail/page.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
import Image from "next/image";
import Link from "next/link";
import Image from 'next/image';
import Link from 'next/link';

export default function Page({
searchParams
}: {
searchParams: {accessToken?:string,message?:string};
}) {
const res = searchParams.message ;
return (
<div className="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-sm">
<h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">
</h2>
</div>

<div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
<form className="space-y-6" action="#" method="POST">
<div>
{res}
</div>
</form>
</div>
</div>
);
};
searchParams
}: {
searchParams: { accessToken?: string; message?: string };
}) {
const res = searchParams.message;
return (
<div className="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-sm">
<h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900"></h2>
</div>

<div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
<form className="space-y-6" action="#" method="POST">
<div>{res}</div>
</form>
</div>
</div>
);
}
13 changes: 2 additions & 11 deletions app/login/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@

export default function Layout({
children,
}: {
children: React.ReactNode
}) {
return (
<div lang="en">
{children}
</div>
)
export default function Layout({ children }: { children: React.ReactNode }) {
return <div lang="en">{children}</div>;
}
56 changes: 28 additions & 28 deletions app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ export default function Page() {
return (
<div className="relative flex min-h-[calc(100vh-152px-64px)] flex-col items-center justify-center">
<Float />
<div className="w-full absolute h-full bg-white bg-opacity-75 backdrop-blur-[7px]">
<div className="flex min-h-full flex-col justify-center px-6 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-sm">
<Image
width={132}
height={66}
className="mx-auto"
src="/icons/logo_login.png"
alt="Sols"
/>
</div>
<div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
<div className="flex items-center justify-center">
<Link href="https://solslab.site/api/oauth2/authorization/kakao" className=" ">
<div className="flex rounded-md bg-kakao px-6 py-2 text-sm font-semibold text-black shadow-sm">
<div className="flex">
<svg viewBox="0 0 21 20" width="21" height="20" fill="none">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M10.5 2.62891C6.16282 2.62891 2.64282 5.36319 2.64282 8.72605C2.64282 10.8239 4.00211 12.6546 6.07639 13.7703L5.20425 16.9682C5.1878 17.0318 5.19118 17.0989 5.21396 17.1605C5.23673 17.2222 5.27781 17.2754 5.33167 17.313C5.38554 17.3506 5.44962 17.3709 5.51532 17.371C5.58102 17.3712 5.6452 17.3513 5.69925 17.3139L9.51782 14.776C9.83997 14.776 10.17 14.8311 10.5 14.8311C14.8371 14.8311 18.3571 12.0968 18.3571 8.72605C18.3571 5.35534 14.8371 2.62891 10.5 2.62891Z"
fill="#181600"
></path>
</svg>
<div className="ml-1">카카오 계정으로 계속하기</div>
<div className="absolute h-full w-full bg-white bg-opacity-75 backdrop-blur-[7px]">
<div className="flex min-h-full flex-col justify-center px-6 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-sm">
<Image
width={132}
height={66}
className="mx-auto"
src="/icons/logo_login.png"
alt="Sols"
/>
</div>
<div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
<div className="flex items-center justify-center">
<Link href="https://solslab.site/api/oauth2/authorization/kakao" className=" ">
<div className="flex rounded-md bg-kakao px-6 py-2 text-sm font-semibold text-black shadow-sm">
<div className="flex">
<svg viewBox="0 0 21 20" width="21" height="20" fill="none">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M10.5 2.62891C6.16282 2.62891 2.64282 5.36319 2.64282 8.72605C2.64282 10.8239 4.00211 12.6546 6.07639 13.7703L5.20425 16.9682C5.1878 17.0318 5.19118 17.0989 5.21396 17.1605C5.23673 17.2222 5.27781 17.2754 5.33167 17.313C5.38554 17.3506 5.44962 17.3709 5.51532 17.371C5.58102 17.3712 5.6452 17.3513 5.69925 17.3139L9.51782 14.776C9.83997 14.776 10.17 14.8311 10.5 14.8311C14.8371 14.8311 18.3571 12.0968 18.3571 8.72605C18.3571 5.35534 14.8371 2.62891 10.5 2.62891Z"
fill="#181600"
></path>
</svg>
<div className="ml-1">카카오 계정으로 계속하기</div>
</div>
</div>
</div>
</Link>
</Link>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
34 changes: 17 additions & 17 deletions app/ui/common/PrelineScript.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
"use client";
'use client';

import { usePathname } from "next/navigation";
import { useEffect } from "react";
import { usePathname } from 'next/navigation';
import { useEffect } from 'react';

import { IStaticMethods } from "preline/preline";
import { IStaticMethods } from 'preline/preline';
declare global {
interface Window {
HSStaticMethods: IStaticMethods;
}
interface Window {
HSStaticMethods: IStaticMethods;
}
}

export default function PrelineScript() {
const path = usePathname();
const path = usePathname();

useEffect(() => {
const loadPreline = async () => {
await import("preline/preline");
useEffect(() => {
const loadPreline = async () => {
await import('preline/preline');

window.HSStaticMethods.autoInit();
};
window.HSStaticMethods.autoInit();
};

loadPreline();
}, [path]);
loadPreline();
}, [path]);

return null;
}
return null;
}
Loading