@automattic/jetpack-components 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +0,0 @@
1
- import { getScriptData } from '@automattic/jetpack-script-data';
2
- /**
3
- * Returns the site admin URL.
4
- *
5
- * @deprecated use `getAdminUrl` from `@automattic/jetpack-script-data` instead.
6
- *
7
- * @return {?string} The site admin URL or null if not available.
8
- */
9
- export default function getSiteAdminUrl() {
10
- return (getScriptData()?.site?.admin_url ||
11
- window.Initial_State?.adminUrl ||
12
- window.Jetpack_Editor_Initial_State?.adminUrl ||
13
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Not using @ts-expect-error because myJetpackInitialState is typed in "my-jetpack" package and that doesn't expect this error
14
- // @ts-ignore The usage of myJetpackInitialState is not typed inside this generic package. We should get rid of it in the future.
15
- window?.myJetpackInitialState?.adminUrl ||
16
- null);
17
- }