Update
This commit is contained in:
27
resources/js/stores/VideoEditorStore.ts
Normal file
27
resources/js/stores/VideoEditorStore.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import axiosInstance from '@/plugins/axios-plugin';
|
||||
import { mountStoreDevtool } from 'simple-zustand-devtools';
|
||||
import { toast } from 'sonner';
|
||||
import { route } from 'ziggy-js';
|
||||
import { create } from 'zustand';
|
||||
import { devtools } from 'zustand/middleware';
|
||||
|
||||
const useVideoEditorStore = create(
|
||||
devtools((set, get) => ({
|
||||
videoIsPlaying: false,
|
||||
|
||||
setVideoIsPlaying: (isPlaying) => {
|
||||
set({ videoIsPlaying: isPlaying });
|
||||
},
|
||||
})),
|
||||
|
||||
{
|
||||
name: 'VideoEditorStore',
|
||||
store: 'VideoEditorStore',
|
||||
},
|
||||
);
|
||||
|
||||
if (import.meta.env.APP_ENV === 'local') {
|
||||
mountStoreDevtool('VideoEditorStore', useVideoEditorStore);
|
||||
}
|
||||
|
||||
export default useVideoEditorStore;
|
||||
Reference in New Issue
Block a user