Skip to content

Commit

Permalink
fix: issue with typings
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed Mar 10, 2023
1 parent 3a0a991 commit a708f45
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/VOffline.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
<script lang="ts">
import Ping from 'ping.js';
import type { ComputedRef, PropType, Ref, SetupContext } from 'vue';
import type { ComputedRef, PropType, Ref } from 'vue';
import { computed, defineComponent, h, onBeforeUnmount, ref } from 'vue';
type VOfflineProps = {
onlineClass?: string;
offlineClass?: string;
pingUrl?: string;
};
export default defineComponent({
name: 'VOffline',
props: {
Expand All @@ -29,7 +23,7 @@
},
},
emits: ['detected-condition'],
setup(props: VOfflineProps, { slots, emit }: SetupContext) {
setup(props, { slots, emit }) {
// Local state
const isOnline: Ref<boolean> = ref(navigator.onLine || false);
const events: Ref<string[]> = ref(['online', 'offline', 'load']);
Expand Down

0 comments on commit a708f45

Please sign in to comment.