From 7b908d4e45a255144402e8c58bc6c750b2842864 Mon Sep 17 00:00:00 2001 From: KimKeeHyun Date: Mon, 15 Jan 2024 09:41:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/products/route.js | 2 +- src/app/components/Header.jsx | 5 +++-- src/app/layouts/DefaultLayout.js | 6 +++--- src/app/not-found.js | 4 ++-- src/app/user/[id]/page.js | 2 +- src/app/user/login/page.js | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/app/api/products/route.js b/src/app/api/products/route.js index e317bd9..c4854d1 100644 --- a/src/app/api/products/route.js +++ b/src/app/api/products/route.js @@ -1,5 +1,5 @@ -import { supabase } from '../../supabase.js'; // supabase 설정 파일 불러오기 +import { supabase } from '@/app/supabase.js'; // supabase 설정 파일 불러오기 export async function GET(req) { // const sortParam = req.query.sort || "id"; const { data, error } = await supabase.from("products").select().order("id", { ascending: true }); diff --git a/src/app/components/Header.jsx b/src/app/components/Header.jsx index 78cc8ae..a01fcd8 100644 --- a/src/app/components/Header.jsx +++ b/src/app/components/Header.jsx @@ -1,5 +1,6 @@ 'use client' import Image from 'next/image' +import Link from 'next/link'; import { useRouter } from 'next/navigation'; import React, { useEffect, useState } from 'react'; // import {NavLink , useLocation } from 'react-router-dom'; // Link , useLocation, useSearchParams,useParams, useSearchParams @@ -33,11 +34,11 @@ export default function Nav() {
- + SUPAMARKET Next.js Logo - +
diff --git a/src/app/layouts/DefaultLayout.js b/src/app/layouts/DefaultLayout.js index 90894e4..5f3ec26 100644 --- a/src/app/layouts/DefaultLayout.js +++ b/src/app/layouts/DefaultLayout.js @@ -2,13 +2,13 @@ import { Inter } from 'next/font/google' import Head from 'next/head'; -import '../globals.css' +import '@/app/globals.css' import '/public/common.css' import '/public/fontawesome/css/all.css' /* import 'https://site-assets.fontawesome.com/releases/v6.2.1/css/all.css' import 'https://fonts.googleapis.com/earlyaccess/notosanskr.css' */ -import Nav from '../components/Nav.jsx'; -import Header from '../components/Header.jsx'; +import Nav from '@/app/components/Nav.jsx'; +import Header from '@/app/components/Header.jsx'; const inter = Inter({ subsets: ['latin'] }) export const metadata = { diff --git a/src/app/not-found.js b/src/app/not-found.js index 3b795a4..45f863b 100644 --- a/src/app/not-found.js +++ b/src/app/not-found.js @@ -2,8 +2,8 @@ import { Link } from 'next/navigation' import { useRouter } from 'next/navigation'; -import Nav from './components/Nav.jsx'; -import Header from './components/Header.jsx'; +import Nav from '@/app/components/Nav.jsx'; +import Header from '@/app/components/Header.jsx'; export default function NotFoundPage() { const router = useRouter(); diff --git a/src/app/user/[id]/page.js b/src/app/user/[id]/page.js index 3b20d99..5749bba 100644 --- a/src/app/user/[id]/page.js +++ b/src/app/user/[id]/page.js @@ -3,8 +3,8 @@ import Image from 'next/image'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import React, { useEffect, useRef, useState } from 'react'; +import { supabase } from '@/app/supabase.js'; import ui from '@/app/ui.js'; -import { supabase } from '../../supabase.js'; export const runtime = 'edge'; diff --git a/src/app/user/login/page.js b/src/app/user/login/page.js index 681fa04..28435b1 100644 --- a/src/app/user/login/page.js +++ b/src/app/user/login/page.js @@ -3,8 +3,8 @@ import Image from 'next/image'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import React, { useEffect, useRef } from 'react'; +import { supabase } from '@/app/supabase.js'; import ui from '@/app/ui.js'; -import { supabase } from '../../supabase.js'; export default function Login() { const router = useRouter();