refactor: use lib uuid instead (for local server)

This commit is contained in:
Methapon2001 2024-07-01 13:10:40 +07:00 committed by Methapon Metanipat
parent fd7c368ae6
commit c2b2e9a783

View file

@ -1,14 +1,15 @@
import { ref } from 'vue';
import { v4 as uuid } from 'uuid';
import { defineStore } from 'pinia';
const useFlowStore = defineStore('flow', () => {
const rtid = ref(crypto.randomUUID());
const rtid = ref(uuid());
return {
rtid,
rotate() {
rtid.value = crypto.randomUUID();
rtid.value = uuid();
},
};
});