PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/workflows/theme/components/SelectThemeFontsVariation.jsx +2 -7 3.1.23.2.1 View file →
@@ -3,9 +3,9 @@
3 3 import { useChatStore } from '@agent/state/chat';
4 4 import { useEffect, useMemo, useRef, useState } from '@wordpress/element';
5 5 import { __ } from '@wordpress/i18n';
6 6
7 -export const SelectThemeFontsVariation = ({ onConfirm, onCancel, onLoad }) => {
7 +export const SelectThemeFontsVariation = ({ onConfirm, onCancel }) => {
8 8 const [css, setCss] = useState('');
9 9 const [selected, setSelected] = useState(null);
10 10 const { undoChange } = useFontVariationOverride({ css });
11 11 const { variations, isLoading } = useThemeFontsVariations();
@@ -33,13 +33,8 @@
33 33 });
34 34 };
35 35
36 36 useEffect(() => {
37 - if (isLoading) return;
38 - onLoad();
39 - }, [isLoading, onLoad]);
40 -
41 - useEffect(() => {
42 37 if (isLoading || !noVariations) return;
43 38 const timer = setTimeout(() => onCancel(), 100);
44 39 // translators: A chat message shown to the user
45 40 const content = __(
@@ -62,9 +57,9 @@
62 57
63 58 if (noVariations) return null;
64 59
65 60 return (
66 - <div className="mb-4 ml-10 mr-2 flex flex-col rounded-lg border border-gray-300 bg-gray-50 rtl:ml-2 rtl:mr-10">
61 + <div className="mb-4 ms-2 me-2 flex flex-col rounded-lg border border-gray-300 bg-gray-50">
67 62 <div className="rounded-lg border-b border-gray-300 bg-white">
68 63 <div className="grid grid-cols-2 gap-2 p-3">
69 64 {shuffled?.slice(0, 10)?.map(({ title, css, styles }) => (
70 65 <button