Skip to content

Commit

Permalink
Committing local changes before pull
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeminseok committed Jul 11, 2024
1 parent fc33951 commit ba28c08
Show file tree
Hide file tree
Showing 543 changed files with 25,990 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VITE_BASE_URL = "https://3.34.147.187.nip.io"

VITE_APIKEY = "AIzaSyAc4XrxZs2G1EVp-NbpCh5rw9rVgnUG284"
VITE_AUTH_DOMAIN = "scbj-af2e3.firebaseapp.com"
VITE_PROJECT_ID = "scbj-af2e3"
VITE_STORAGE_BUCKET = "scbj-af2e3.appspot.com"
VITE_MESSAGING_SENDERID = "177564796245"
VITE_APPID = "1:177564796245:web:6b27b878cbc2ccacf39bdc"
VITE_MEASUREMENT_ID = "G-1YD7ZEM9HM"

VITE_FIREBASE_VAPID = "BNJnISNECPJrEzIQ8Mbjvw2bu3GQrwo52ChZT0E8BX243r9WAlXS7yYZJntYKt537lSs4188KsLJLJFFdPyRL3Q"
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "percenthotel"
}
}
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: issue
about: 새로운 issue 추가
title: ''
labels: ''
assignees: ''
---

## 설명

## 할 일

- [ ]
29 changes: 29 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
"on":
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
env:
VITE_APIKEY: "${{secrets.VITE_APIKEY}}"
VITE_AUTH_DOMAIN: "${{secrets.VITE_AUTH_DOMAIN}}"
VITE_PROJECT_ID: "${{secrets.VITE_PROJECT_ID}}"
VITE_STORAGE_BUCKET: "${{secrets.VITE_STORAGE_BUCKET}}"
VITE_MESSAGING_SENDERID: "${{secrets.VITE_MESSAGING_SENDERID}}"
VITE_APPID: "${{secrets.VITE_APPID}}"
VITE_MEASUREMENT_ID: "${{secrets.VITE_MEASUREMENT_ID}}"
VITE_FIREBASE_VAPID: "${{secrets.VITE_FIREBASE_VAPID}}"
steps:
- uses: actions/checkout@v3
- run: npm install && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PERCENTHOTEL }}"
channelId: live
projectId: percenthotel
26 changes: 26 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
"on": pull_request
jobs:
build_and_preview:
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
env:
VITE_APIKEY: "${{secrets.VITE_APIKEY}}"
VITE_AUTH_DOMAIN: "${{secrets.VITE_AUTH_DOMAIN}}"
VITE_PROJECT_ID: "${{secrets.VITE_PROJECT_ID}}"
VITE_STORAGE_BUCKET: "${{secrets.VITE_STORAGE_BUCKET}}"
VITE_MESSAGING_SENDERID: "${{secrets.VITE_MESSAGING_SENDERID}}"
VITE_APPID: "${{secrets.VITE_APPID}}"
VITE_MEASUREMENT_ID: "${{secrets.VITE_MEASUREMENT_ID}}"
VITE_FIREBASE_VAPID: "${{secrets.VITE_FIREBASE_VAPID}}"
steps:
- uses: actions/checkout@v3
- run: npm install && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PERCENTHOTEL }}"
projectId: percenthotel
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"singleQuote": false,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"printWidth": 80,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "auto"
}
20 changes: 20 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
};
export default config;
27 changes: 27 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import type { Preview } from "@storybook/react";
import { ThemeProvider } from "styled-components";
import { GlobalStyle } from "../src/styles/globalStyle";
import { theme } from "../src/styles/theme";

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export const decorators = [
(Story) => (
<ThemeProvider theme={theme}>
<GlobalStyle />
<Story />
</ThemeProvider>
),
];

export default preview;
12 changes: 12 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
38 changes: 38 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "퍼센트 호텔",
"short_name": "Percent Hotel",
"start_url": "/",
"display": "standalone",
"background_color": "#FF7C17",
"lang": "ko",
"scope": "/",
"orientation": "portrait",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/icon-192-maskable.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/icon-512-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
],
"description": "양도 거래? 취소보다 빠른 거래!",
"id": "ph",
"prefer_related_applications": true,
"categories": ["entertainment", "shopping", "social", "travel"]
}
12 changes: 12 additions & 0 deletions offline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>internet disconnected</title>
</head>
<body>
<p>인터넷 연결 없음</p>
</body>
</html>
Binary file added public/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
75 changes: 75 additions & 0 deletions public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* global firebase */
/**
* Here is is the code snippet to initialize Firebase Messaging in the Service
* Worker when your app is not hosted on Firebase Hosting.
// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here. Other Firebase libraries
// are not available in the service worker.
**/
self.importScripts(
"https://www.gstatic.com/firebasejs/9.2.0/firebase-app-compat.js",
);
self.importScripts(
"https://www.gstatic.com/firebasejs/9.2.0/firebase-messaging-compat.js",
);

var firebaseConfig = {
apiKey: "AIzaSyAc4XrxZs2G1EVp-NbpCh5rw9rVgnUG284",
authDomain: "scbj-af2e3.firebaseapp.com",
projectId: "scbj-af2e3",
storageBucket: "scbj-af2e3.appspot.com",
messagingSenderId: "177564796245",
appId: "1:177564796245:web:6b27b878cbc2ccacf39bdc",
measurementId: "G-1YD7ZEM9HM",
};

firebase.initializeApp(firebaseConfig);

// // Retrieve an instance of Firebase Messaging so that it can handle background
// // messages.
const messaging = firebase.messaging();

self.addEventListener("install", function () {
console.log("fcm sw install..");
self.skipWaiting();
});

self.addEventListener("activate", function () {
console.log("fcm sw activate..");
});

// self.addEventListener("push", function (e) {
// console.log("push: ", e.data.json());
// if (!e.data.json()) return;

// const resultData = e.data.json().data;
// const notificationTitle = resultData.title;
// const notificationOptions = {
// body: resultData.message,
// icon: "/icon-192.png",
// };
// console.log("push: ", { notificationTitle, notificationOptions });

// self.registration.showNotification(notificationTitle, notificationOptions);
// });

self.addEventListener("notificationclick", function (event) {
console.log("notification click");
const url = "/";
event.notification.close();
event.waitUntil(self.clients.openWindow(url));
});

messaging.onBackgroundMessage(function (payload) {
console.log("Received background message", payload);
// Customize notification here
const notificationTitle = payload.data.title;
const notificationOptions = {
body: payload.data.message,
icon: "/icon-192.png",
};

self.registration.showNotification(notificationTitle, notificationOptions);
});
Binary file added public/icon-192-maskable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icon-512-maskable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/maskable-icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ba28c08

Please sign in to comment.