diff --git a/package-lock.json b/package-lock.json index 10971b45..573a7e54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,8 @@ "next": "13.5.6", "react": "^18", "react-dom": "^18", - "recoil": "^0.7.7" + "recoil": "^0.7.7", + "swiper": "^11.1.3" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -4665,6 +4666,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swiper": { + "version": "11.1.3", + "resolved": "https://registry.npmjs.org/swiper/-/swiper-11.1.3.tgz", + "integrity": "sha512-80MSxonyTxrGcaWj9YgvvhD8OG0B9/9IVZP33vhIEvyWvmKjnQDBieO+29wKvMx285sAtvZyrWBdkxaw6+D3aw==", + "funding": [ + { + "type": "patreon", + "url": "https://www.patreon.com/swiperjs" + }, + { + "type": "open_collective", + "url": "http://opencollective.com/swiper" + } + ], + "engines": { + "node": ">= 4.7.0" + } + }, "node_modules/tailwind-scrollbar": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/tailwind-scrollbar/-/tailwind-scrollbar-3.0.5.tgz", diff --git a/package.json b/package.json index 82dfa214..51cc8e99 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "next": "13.5.6", "react": "^18", "react-dom": "^18", - "recoil": "^0.7.7" + "recoil": "^0.7.7", + "swiper": "^11.1.3" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/public/PublicBadge.svg b/public/PublicBadge.svg new file mode 100644 index 00000000..a86721a8 --- /dev/null +++ b/public/PublicBadge.svg @@ -0,0 +1,5 @@ + diff --git a/src/app/api/public/data.json b/src/app/api/public/data.json new file mode 100644 index 00000000..4435ee73 --- /dev/null +++ b/src/app/api/public/data.json @@ -0,0 +1,62 @@ +[ + { + "id": "1", + "title": "데이터 1", + "description": "이것은 데이터 1입니다.", + "time": "10:00" + }, + { + "id": "2", + "title": "데이터 2", + "description": "이것은 데이터 2입니다.", + "time": "11:00" + }, + { + "id": "3", + "title": "데이터 3", + "description": "이것은 데이터 3입니다.", + "time": "12:00" + }, + { + "id": "4", + "title": "데이터 4", + "description": "이것은 데이터 4입니다.", + "time": "13:00" + }, + { + "id": "5", + "title": "데이터 5", + "description": "이것은 데이터 5입니다.", + "time": "14:00" + }, + { + "id": "6", + "title": "데이터 6", + "description": "이것은 데이터 6입니다.", + "time": "15:00" + }, + { + "id": "7", + "title": "데이터 7", + "description": "이것은 데이터 7입니다.", + "time": "16:00" + }, + { + "id": "8", + "title": "데이터 8", + "description": "이것은 데이터 8입니다.", + "time": "17:00" + }, + { + "id": "9", + "title": "데이터 9", + "description": "이것은 데이터 9입니다.", + "time": "18:00" + }, + { + "id": "10", + "title": "데이터 10", + "description": "이것은 데이터 10입니다.", + "time": "19:00" + } +] diff --git a/src/app/api/public/route.ts b/src/app/api/public/route.ts new file mode 100644 index 00000000..7e50d2d9 --- /dev/null +++ b/src/app/api/public/route.ts @@ -0,0 +1,7 @@ +import { NextResponse } from 'next/server'; + +import data from './data.json'; + +export async function GET(request: any) { + return NextResponse.json(data, { status: 200 }); +} diff --git a/src/app/create/page.tsx b/src/app/create/page.tsx index a59d4cac..2b8dab5f 100644 --- a/src/app/create/page.tsx +++ b/src/app/create/page.tsx @@ -13,6 +13,7 @@ import { logging } from '@/services/mixpanel'; import { axiosPostBoard } from '@/utils/apiInterface'; import { confirm } from '@/utils/confirm'; import { defaultState } from '@/utils/theme/default'; +import { toggleDialog } from '@/utils/toggleDialo'; export default function Create() { const [openModal, closeModal] = useModal(); @@ -29,6 +30,12 @@ export default function Create() { }; const handleConfirm = async () => { + const isPublic = await toggleDialog( + openModal, + closeModal, + '잠깐! 🙌', + '공개하기를 선택하면 내가 만든\n 스트링캣이 랜덤으로 홈에 공개돼요!', + ); const isConfirmed = await confirm( openModal, closeModal, @@ -38,6 +45,7 @@ export default function Create() { if (isConfirmed) { logging('click_submit_board_confirm', 'create'); const data = { + public: isPublic, theme: themelist[preview - 1], title: `${title}`, }; diff --git a/src/app/globals.css b/src/app/globals.css index 8eb6162c..c85d7e48 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -23,6 +23,7 @@ body { -ms-overflow-style: none; } + ::-webkit-scrollbar { display: none; } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 9720239c..e19520ee 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,3 @@ -'use client'; - -import { RecoilRoot } from 'recoil'; - import Script from 'next/script'; import './globals.css'; @@ -10,6 +6,7 @@ import Description from '@/component/Common/Description'; import Modal from '@/component/Common/Modal'; import OpenGraph from '@/component/Common/OpenGraph'; import InApp from '@/component/InApp'; +import RecoilWrapper from '@/component/RecoilWrapper'; export default function RootLayout({ children, @@ -46,11 +43,11 @@ export default function RootLayout({