Skip to content

Commit 67717aa

Browse files
luizhf42gustavosbarreto
authored andcommitted
refactor(ui): migrate Snackbar to script setup syntax
1 parent 74fe38b commit 67717aa

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed
Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
11
<template>
2-
<snackbar-sucess :type-message="message.typeMessage" :main-content="message.typeContent" />
2+
<snackbar-success :type-message="message.typeMessage" :main-content="message.typeContent" />
33

44
<snackbar-error :type-message="message.typeMessage" :main-content="message.typeContent" />
55

66
<snackbar-copy :main-content="message.typeContent" />
77
</template>
88

9-
<script lang="ts">
10-
import { defineComponent, computed } from "vue";
11-
import SnackbarSucess from "./SnackbarSucess.vue";
9+
<script setup lang="ts">
10+
import { computed } from "vue";
11+
import SnackbarSuccess from "./SnackbarSuccess.vue";
1212
import SnackbarError from "./SnackbarError.vue";
1313
import SnackbarCopy from "./SnackbarCopy.vue";
1414
import { useStore } from "@/store";
1515
16-
export default defineComponent({
17-
setup() {
18-
const store = useStore();
19-
20-
const message = computed(() => store.getters["snackbar/snackbarMessageAndContentType"]);
21-
22-
return {
23-
message,
24-
};
25-
},
26-
components: { SnackbarSucess, SnackbarError, SnackbarCopy },
27-
});
16+
const store = useStore();
17+
const message = computed(() => store.getters["snackbar/snackbarMessageAndContentType"]);
2818
</script>

0 commit comments

Comments
 (0)