diff --git a/app/globals.css b/app/globals.css index fb6ce04..dd19a73 100644 --- a/app/globals.css +++ b/app/globals.css @@ -26,6 +26,8 @@ button, input, textarea { font: inherit; } button { cursor: pointer; } .app-shell { position: relative; + display: flex; + flex-direction: column; width: min(100%, 480px); min-height: 100vh; min-height: 100dvh; @@ -35,7 +37,7 @@ button { cursor: pointer; } box-shadow: 0 0 48px rgba(48, 98, 126, .12); } .page { min-height: 100vh; min-height: 100dvh; padding: 0 20px 112px; } -.main-tab-page { padding-bottom: 80px; } +.main-tab-page { flex: 1; min-height: 0; padding-bottom: 20px; } .safe-top { padding-top: max(8px, env(safe-area-inset-top)); } .home-header-top { padding-top: max(9px, env(safe-area-inset-top)); } .main-tab-bar { @@ -50,6 +52,10 @@ button { cursor: pointer; } background: rgba(238, 249, 255, .96); backdrop-filter: blur(14px); } +.main-tab-footer-spacer { + height: calc(61px + max(7px, env(safe-area-inset-bottom))); + flex: none; +} .mobile-fixed { position: fixed; z-index: 30; diff --git a/app/layout.tsx b/app/layout.tsx index cc5be3e..a4fe10c 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata, Viewport } from "next"; import "./globals.css"; import { Providers } from "@/app/providers"; import { MainTabNavigation } from "@/components/main-tab-navigation"; +import { SiteFooter } from "@/components/site-footer"; const siteUrl = new URL("https://nalssilog.com"); const siteDescription = "우리 동네 사람들이 직접 전하는 지금 날씨를 사진과 함께 확인하고 제보해 보세요."; @@ -54,6 +55,7 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
{children} +
diff --git a/components/site-footer.tsx b/components/site-footer.tsx new file mode 100644 index 0000000..8c74b19 --- /dev/null +++ b/components/site-footer.tsx @@ -0,0 +1,85 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { useState } from "react"; + +import { UserPanel } from "@/components/user-panel"; +import { useLegalModalStore } from "@/store/legal-modal-store"; + +const MAIN_TAB_PATHS = new Set(["/", "/mypage"]); + +export function SiteFooter() { + const pathname = usePathname(); + const [isFeedbackOpen, setIsFeedbackOpen] = useState(false); + const openLegalDocument = useLegalModalStore((state) => state.openLegalDocument); + + if (pathname === "/reports/new") return null; + + const hasMainTabNavigation = MAIN_TAB_PATHS.has(pathname); + + return ( + <> + + + {isFeedbackOpen ? ( + setIsFeedbackOpen(false)} + /> + ) : null} + + ); +} diff --git a/package-lock.json b/package-lock.json index aaa1bdd..014fd21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nalssilog-web", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nalssilog-web", - "version": "0.2.0", + "version": "0.2.1", "dependencies": { "@hookform/resolvers": "latest", "@sentry/nextjs": "^10.67.0", diff --git a/package.json b/package.json index 58d23b7..787bfc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nalssilog-web", - "version": "0.2.0", + "version": "0.2.1", "private": true, "scripts": { "config:init": "git -c submodule.env-config.update=checkout submodule update --init --checkout env-config && git -C env-config switch main && git -C env-config pull --ff-only origin main && npm run config:sync",