Initial commit: PC Builder AdonisJS project
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { ref, watch } from 'vue'
|
||||
|
||||
// Cr├®er une r├®f├®rence pour isAdminActive
|
||||
const isAdminActive = ref(JSON.parse(localStorage.getItem('isAdminActive') || 'false'))
|
||||
|
||||
// Surveiller les changements de isAdminActive et mettre à jour localStorage
|
||||
watch(isAdminActive, (newValue) => {
|
||||
localStorage.setItem('isAdminActive', JSON.stringify(newValue))
|
||||
})
|
||||
|
||||
// Exporter une fonction pour utiliser isAdminActive
|
||||
export function useAdminMode() {
|
||||
return { isAdminActive }
|
||||
}
|
||||
Reference in New Issue
Block a user