Zmiany nazw offers

This commit is contained in:
dm
2025-12-16 11:38:38 +01:00
parent a7e87f5d7b
commit 31ebf5c90f
16 changed files with 18 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from "preact/hooks";
import "../../styles/modal.css";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
function formatFeatureValue(val) {
if (val === true || val === "true") return "✓";

View File

@@ -1,8 +1,8 @@
import { useEffect, useState } from "preact/hooks";
import Markdown from "../Markdown.jsx";
import OffersSwitches from "../OffersSwitches.jsx";
import OffersSwitches from "../Switches.jsx";
import InternetAddonsModal from "./InternetAddonsModal.jsx";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
function formatMoney(amount, currency = "PLN") {
if (typeof amount !== "number" || Number.isNaN(amount)) return "";

View File

@@ -23,12 +23,10 @@ export default function OffersSwitches({ switches = [] }) {
const [selected, setSelected] = useState(initialSelected);
// gdy switches się zmienią (np. hot reload) zresetuj sensownie
useEffect(() => {
setSelected(initialSelected);
}, [initialSelected]);
// globalny stan + event (tak jak masz teraz)
useEffect(() => {
const labels = buildLabels(switches, selected);
@@ -66,7 +64,6 @@ export default function OffersSwitches({ switches = [] }) {
<div class="f-switch-group" key={sw.id}>
{/* (opcjonalnie) etykieta */}
{/* <div class="f-switch-label">{sw.etykieta}</div> */}
{sw.opcje?.map((op) => (
<button
key={`${sw.id}:${op.id}`}

View File

@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from "preact/hooks";
import "../../styles/modal.css";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
function formatFeatureValue(val) {
if (val === true || val === "true") return "✓";

View File

@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from "preact/hooks";
import "../../styles/modal.css";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
function formatFeatureValue(val) {
if (val === true || val === "true") return "✓";

View File

@@ -1,7 +1,7 @@
import { useEffect, useState } from "preact/hooks";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
import OffersSwitches from "../OffersSwitches.jsx";
import OffersSwitches from "../Switches.jsx";
import JamboxChannelsModal from "./JamboxChannelsModal.jsx";
import JamboxAddonsModal from "./JamboxAddonsModalCompact.jsx";
import Markdown from "../Markdown.jsx";

View File

@@ -1,6 +1,6 @@
import { useEffect, useMemo, useState } from "preact/hooks";
import "../../styles/modal.css";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
import "../../styles/channels-search.css";
export default function JamboxChannelsModal({ isOpen, onClose, pkg }) {

View File

@@ -1,5 +1,5 @@
import Markdown from "../../islands/Markdown.jsx";
import "../../styles/offers-table.css";
import "../../styles/addons.css";
/**
* @typedef {{ klucz: string, label: string, value: (string|number) }} PhoneParam