-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
100 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
NEXT_PUBLIC_APP_URL="http://localhost:3000" | ||
|
||
NEXT_PUBLIC_FIREBASE_API_KEY="" | ||
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="xxx.firebaseapp.com" | ||
NEXT_PUBLIC_FIREBASE_PROJECT_ID="" | ||
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="xxx.appspot.com" | ||
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="" | ||
NEXT_PUBLIC_FIREBASE_APP_ID="" | ||
# 本番 | ||
NEXT_PUBLIC_FIREBASE_API_KEY= | ||
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= | ||
NEXT_PUBLIC_FIREBASE_PROJECT_ID= | ||
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= | ||
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= | ||
NEXT_PUBLIC_FIREBASE_APP_ID= | ||
|
||
BASIC_AUTH_USERNAME="" | ||
BASIC_AUTH_PASSWORD="" | ||
# 開発 | ||
NEXT_PUBLIC_DEV_FIREBASE_API_KEY= | ||
NEXT_PUBLIC_DEV_FIREBASE_AUTH_DOMAIN= | ||
NEXT_PUBLIC_DEV_FIREBASE_PROJECT_ID= | ||
NEXT_PUBLIC_DEV_FIREBASE_STORAGE_BUCKET= | ||
NEXT_PUBLIC_DEV_FIREBASE_MESSAGING_SENDER_ID= | ||
NEXT_PUBLIC_DEV_FIREBASE_APP_ID= | ||
|
||
BASIC_AUTH_USERNAME= | ||
BASIC_AUTH_PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use client" | ||
|
||
import { prodDb } from "@/lib/firebase" | ||
|
||
import UserList from "./components/UserList" | ||
|
||
export const ProdUserList = () => { | ||
return <UserList db={prodDb} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use client" | ||
|
||
import { devDb } from "@/lib/firebase/dev" | ||
|
||
import UserList from "../components/UserList" | ||
|
||
export const DevUserList = () => { | ||
return <UserList db={devDb} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { DevUserList } from "./DevUserList" | ||
|
||
const Dev = () => { | ||
return ( | ||
<main> | ||
<div className="m-4"> | ||
<DevUserList /> | ||
</div> | ||
</main> | ||
) | ||
} | ||
|
||
export default Dev | ||
|
||
export const metadata = { | ||
title: "Kanpai! Debugger", | ||
description: "Kanpai! Debugger", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const prodConfig = { | ||
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_FIREBASE_STORAGE_BUCKET"], | ||
messagingSenderId: process.env["NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID"], | ||
appId: process.env["NEXT_PUBLIC_FIREBASE_APP_ID"], | ||
} | ||
|
||
export const devConfig = { | ||
apiKey: process.env["NEXT_PUBLIC_FDEV_IREBASE_API_KEY"], | ||
authDomain: process.env["NEXT_PUBLIC_DEV_FIREBASE_AUTH_DOMAIN"], | ||
projectId: process.env["NEXT_PUBLIC_DEV_FIREBASE_PROJECT_ID"], | ||
storageBucket: process.env["NEXT_PUBLIC_DEV_FIREBASE_STORAGE_BUCKET"], | ||
messagingSenderId: process.env["NEXT_PUBLIC_DEV_FIREBASE_MESSAGING_SENDER_ID"], | ||
appId: process.env["NEXT_PUBLIC_DEV_FIREBASE_APP_ID"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { initializeApp } from "firebase/app" | ||
import { getFirestore } from "firebase/firestore" | ||
|
||
import { devConfig } from "./config" | ||
|
||
export const devApp = initializeApp(devConfig) | ||
|
||
export const devDb = getFirestore(devApp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
import { initializeApp } from "firebase/app" | ||
import { getFirestore } from "firebase/firestore" | ||
|
||
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_FIREBASE_STORAGE_BUCKET"], | ||
messagingSenderId: process.env["NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID"], | ||
appId: process.env["NEXT_PUBLIC_FIREBASE_APP_ID"], | ||
} | ||
import { prodConfig } from "./config" | ||
|
||
export const app = initializeApp(firebaseConfig) | ||
export const prodApp = initializeApp(prodConfig) | ||
|
||
export const db = getFirestore(app) | ||
export const prodDb = getFirestore(prodApp) |