$78 GRAYBYTE WORDPRESS FILE MANAGER $12

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/Launch/state/

HOME
Current File : /home/bravrvjk/dantho.rw/wp-content/plugins/extendify/src/Launch/state//pages-selections.js
import { safeParseJson } from '@shared/lib/parsing';
import { create } from 'zustand';
import { devtools, persist, createJSONStorage } from 'zustand/middleware';

const initialState = {
	pages: [],
	style: null,
};

const key = `extendify-launch-pages-selection-${window.extSharedData.siteId}`;
const state = (set, get) => ({
	// initialize the state with default values
	...initialState,
	...(safeParseJson(window.localStorage.getItem(key))?.state || {}),
	has(type, item) {
		if (!item?.id) return false;
		return (get()?.[type] ?? [])?.some((t) => t.id === item.id);
	},
	add(type, item) {
		if (get().has(type, item)) return;
		set({ [type]: [...(get()?.[type] ?? []), item] });
	},
	remove(type, item) {
		set({ [type]: get()?.[type]?.filter((t) => t.id !== item.id) });
	},
	removeAll(type) {
		set({ [type]: [] });
	},
	setStyle(style) {
		set({ style });
	},
});

export const usePagesSelectionStore = create(
	persist(devtools(state, { name: 'Extendify Launch Pages Selections' }), {
		name: key,
		storage: createJSONStorage(() => localStorage),
		skipHydration: true,
	}),
	state,
);


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
6 Nov 2025 10.43 AM
bravrvjk / bravrvjk
0755
Global.js
0.251 KB
11 Oct 2023 6.07 AM
bravrvjk / bravrvjk
0644
Pages.js
3.38 KB
26 Mar 2025 6.03 PM
bravrvjk / bravrvjk
0644
factory.js
0.186 KB
11 Oct 2023 6.07 AM
bravrvjk / bravrvjk
0644
pages-selections.js
1.069 KB
26 Mar 2025 6.03 PM
bravrvjk / bravrvjk
0644
user-selections.js
5.155 KB
23 Oct 2025 8.20 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF