Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
fix: add uuid for slug, build: test netlify deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
soulsam480 committed May 6, 2021
1 parent b6a5985 commit 160e741
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 134 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"popper.js": "^1.16.1",
"randomcolor": "^0.6.2",
"register-service-worker": "^1.7.1",
"uuid": "^8.3.2",
"v-emoji-picker": "^2.3.0",
"vue": "^2.6.11",
"vue-click-outside": "^1.1.0",
Expand Down
2 changes: 2 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Netlify settings for single-page application
/* /index.html 200
7 changes: 2 additions & 5 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<script lang="ts">
//@ts-ignore
import ClickOutside from 'vue-click-outside';
import { v4 as uuidv4 } from 'uuid';
import TopContext from '@/components/TopContext.vue';
import Tooltip from '@/components/Tooltip.vue';
import Context from '@/components/Context.vue';
Expand Down Expand Up @@ -259,10 +259,7 @@ export default Vue.extend<Data, Methods, Computed>({
this.$refs.sidebar.classList.toggle('sidebar-active');
},
createBoard() {
const id = Math.random()
.toString(20)
.substr(2)
.toUpperCase();
const id = uuidv4();
this.$router.push({ name: 'Board', params: { _slug: id } });
},
},
Expand Down
19 changes: 13 additions & 6 deletions src/firebase/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import firebase from "firebase/app";
import "firebase/storage";
import "firebase/firebase-database";
import "firebase/firebase-auth";
import config from './cred';
import firebase from 'firebase/app';
import 'firebase/storage';
import 'firebase/firebase-database';
import 'firebase/firebase-auth';

const config = {
apiKey: process.env.VUE_APP_apiKey,
authDomain: process.env.VUE_APP_authDomain,
databaseURL: process.env.VUE_APP_databaseURL,
projectId: process.env.VUE_APP_projectId,
storageBucket: process.env.VUE_APP_storageBucket,
messagingSenderId: process.env.VUE_APP_messagingSenderId,
appId: process.env.VUE_APP_appId,
};

firebase.initializeApp(config);

const db = firebase.database();
const auth = firebase.auth();
const storageref = firebase.storage();
Expand Down
Loading

0 comments on commit 160e741

Please sign in to comment.