Skip to content

Commit

Permalink
Merge pull request #43 from joshxfi/dev
Browse files Browse the repository at this point in the history
release: v1.0.6 - beta
  • Loading branch information
joshxfi authored Mar 12, 2022
2 parents c27c1b3 + f068a92 commit 4658e40
Show file tree
Hide file tree
Showing 51 changed files with 3,040 additions and 888 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"no-shadow": "off",
"import/extensions": ["error", "never"],
"no-underscore-dangle": "off",
"no-console": "warn"
"no-console": "warn",
"react/function-component-definition": "off"
},
"settings": {
"import/resolver": {
Expand Down
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "trackas1"
}
}
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ jobs:
run: yarn

- name: Lint files
run: yarn lint
run: yarn check-lint

- name: Build project
env:
NEXT_PUBLIC_API_KEY: ${{ secrets.NEXT_PUBLIC_API_KEY }}
NEXT_PUBLIC_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_AUTH_DOMAIN }}
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }}
NEXT_PUBLIC_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_STORAGE_BUCKET }}
NEXT_PUBLIC_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_MESSAGING_SENDER_ID }}
NEXT_PUBLIC_APP_ID: ${{ secrets.NEXT_PUBLIC_APP_ID }}
NEXT_PUBLIC_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_MEASUREMENT_ID }}
run: yarn build
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ yarn-error.log*

#tsconfig
tsconfig.tsbuildinfo

# PWA
sw.js
workbox-*.js
fallback-*.js
14 changes: 14 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"emulators": {
"firestore": {
"port": 8080
},
"ui": {
"enabled": true
}
}
}
33 changes: 33 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"indexes": [
{
"collectionGroup": "rooms",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "creator",
"order": "ASCENDING"
},
{
"fieldPath": "dateAdded",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "rooms",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "members",
"arrayConfig": "CONTAINS"
},
{
"fieldPath": "dateAdded",
"order": "ASCENDING"
}
]
}
],
"fieldOverrides": []
}
8 changes: 8 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
16 changes: 16 additions & 0 deletions next-seo-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,20 @@ export default {
twitter: {
cardType: 'summary_large_image',
},
additionalLinkTags: [
{
rel: 'icon',
href: '/favicon.ico',
type: 'image/x-icon',
},
{
rel: 'apple-touch-icon',
href: '/icons/apple-touch-icon.png',
sizes: '180x180',
},
{
rel: 'manifest',
href: '/manifest.json',
},
],
};
13 changes: 8 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
};
const withPWA = require('next-pwa');

module.exports = {
module.exports = withPWA({
pwa: {
dest: 'public',
disable: process.env.NODE_ENV === 'development',
},
reactStrictMode: true,
images: {
domains: ['lh3.googleusercontent.com', 'firebasestorage.googleapis.com'],
},
};
});
33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
},
"dependencies": {
"@headlessui/react": "^1.5.0",
"firebase": "^9.6.7",
"firebase": "^9.6.8",
"nanoid": "^3.3.1",
"next": "^12.1.0",
"next-pwa": "^5.4.5",
"next-seo": "^5.1.0",
"nprogress": "^0.2.0",
"react": "17.0.2",
Expand All @@ -28,25 +29,25 @@
},
"devDependencies": {
"@types/nprogress": "^0.2.0",
"@types/react": "17.0.20",
"@types/react-datepicker": "^4.1.7",
"@typescript-eslint/parser": "^4.33.0",
"autoprefixer": "^10.4.0",
"eslint": "^8.8.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-next": "11.1.2",
"eslint-config-prettier": "^8.3.0",
"@types/react": "^17.0.40",
"@types/react-datepicker": "^4.3.4",
"@typescript-eslint/parser": "^5.14.0",
"autoprefixer": "^10.4.2",
"eslint": "^8.10.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-next": "^12.1.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "1.7.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.3",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.0",
"lint-staged": "^12.3.2",
"postcss": "^8.4.4",
"lint-staged": "^12.3.5",
"postcss": "^8.4.8",
"prettier": "^2.5.1",
"prettier-plugin-tailwindcss": "^0.1.8",
"tailwindcss": "^3.0.1",
"typescript": "4.4.3"
"tailwindcss": "^3.0.23",
"typescript": "^4.6.2"
},
"lint-staged": {
"*.{js,ts,tsx}": "eslint --cache --fix",
Expand Down
11 changes: 11 additions & 0 deletions pages/_offline.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { ReactElement } from 'react';
import { Error, Layout } from '@/components';
import { NextPageWithLayout } from '@/types/page';

const Offline: NextPageWithLayout = () => (
<Error code='Offline' info='you are currently offline' />
);

Offline.getLayout = (page: ReactElement) => <Layout>{page}</Layout>;

export default Offline;
2 changes: 1 addition & 1 deletion pages/invites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Invites: React.FC = () => {

return (
<Layout loaders={[loading]}>
<Header title='Invitation' />
<Header title='Invitation' backBtn={user.invites?.length > 0} />
{!user?.invites?.length && <EmptyMsg empty='invites' />}
<div className='mb-4 w-full space-y-2'>
{user?.invites?.map((roomId) => (
Expand Down
Loading

1 comment on commit 4658e40

@vercel
Copy link

@vercel vercel bot commented on 4658e40 Mar 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.