Fixed TS errors and warnings
This commit is contained in:
parent
cfc46dddd3
commit
390e0fc95b
|
@ -8,13 +8,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, onBeforeMount } from '@vue/composition-api';
|
import { defineComponent } from '@vue/composition-api';
|
||||||
import { BalanceInterface } from 'src/plugins/balance/store/balance';
|
|
||||||
import { Store } from 'vuex';
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'DummyWidget',
|
name: 'DummyWidget',
|
||||||
setup(_, { root }) {
|
setup() {
|
||||||
function randomNumber(start: number, end: number) {
|
function randomNumber(start: number, end: number) {
|
||||||
return start + Math.floor(Math.random() * Math.floor(end));
|
return start + Math.floor(Math.random() * Math.floor(end));
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ export default defineComponent({
|
||||||
setup(_, { root }) {
|
setup(_, { root }) {
|
||||||
const store = <Store<StateInterface>>root.$store;
|
const store = <Store<StateInterface>>root.$store;
|
||||||
const avatarLink = computed(() => {
|
const avatarLink = computed(() => {
|
||||||
const hash = MD5(store.state.user.currentUser?.mail.trim());
|
const hash = MD5(store.state.user.currentUser?.mail || '').toString();
|
||||||
return `https://www.gravatar.com/avatar/${hash}?s=500&d=robohash`;
|
return `https://www.gravatar.com/avatar/${hash}?s=500&d=robohash`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue