+
{
return (
diff --git a/src/lib/firebase/index.ts b/src/lib/firebase/index.ts
index 8869066d..3c156bfb 100644
--- a/src/lib/firebase/index.ts
+++ b/src/lib/firebase/index.ts
@@ -4,15 +4,7 @@ import {
getFirestore,
collection,
} from 'firebase/firestore'
-
-export const firebaseConfig = {
- apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
- authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
- projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
- storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET,
- messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID,
- appId: process.env.NEXT_PUBLIC_APP_ID,
-}
+import firebaseConfig from '@/config/firebaseConfig'
const fb = initializeApp(firebaseConfig)
const db = getFirestore(fb)
@@ -21,11 +13,4 @@ const getMessageRef = (roomId: string): CollectionReference => {
return collection(db, 'chats', roomId, 'messages')
}
-// async function getData(db: Firestore) {
-// const dataCol = collection(db, 'chats', 'room2', 'messages')
-// const dataSnap = await getDocs(dataCol)
-// const dataList = dataSnap.docs.map((doc) => doc.data())
-// return dataList
-// }
-
export { db, getMessageRef }
diff --git a/src/styles/globals.css b/src/styles/globals.css
index f0199365..df9986a1 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -5,6 +5,9 @@
@layer base {
:root {
--nav-height: 3.5rem;
+ --page-height: calc(100vh - var(--nav-height));
+ --chat-input-height: 4.5rem;
+
--page-min-width: 320px;
--page-max-width: 640px;
}
diff --git a/src/types/message.ts b/src/types/message.ts
new file mode 100644
index 00000000..4b646b13
--- /dev/null
+++ b/src/types/message.ts
@@ -0,0 +1,10 @@
+import { Timestamp } from 'firebase/firestore'
+
+interface Message {
+ text: string
+ createdAt: Timestamp
+ sender: string
+ id: string
+}
+
+export type { Message }
diff --git a/tailwind.config.js b/tailwind.config.js
index 6c0fd02c..260b94fe 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -24,6 +24,8 @@ module.exports = {
height: {
...HEIGHT,
nav: 'var(--nav-height)',
+ page: 'var(--page-height)',
+ chat_input: 'var(--chat-input-height)',
},
borderRadius: {
...BORDER_RADIUS,
@@ -36,6 +38,9 @@ module.exports = {
fontFamily: {
pretendard: ['Pretendard'],
},
+ padding: {
+ chat_input: 'var(--chat-input-height)',
+ },
},
},
plugins: [