Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions example/src/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { showToast, setLoading } from './utils';
import { renderMainScreen } from './screens/MainScreen';
import { renderProductsScreen } from './screens/ProductsScreen';
import { renderEntitlementsScreen } from './screens/EntitlementsScreen';
import { renderOfferingsScreen } from './screens/OfferingsScreen';
import { renderRemoteConfigsScreen } from './screens/RemoteConfigsScreen';
import { renderUserScreen } from './screens/UserScreen';
import { renderNoCodesScreen } from './screens/NoCodesScreen';
Expand All @@ -23,7 +22,6 @@ const screenRenderers: Record<string, () => string> = {
main: renderMainScreen,
products: renderProductsScreen,
entitlements: renderEntitlementsScreen,
offerings: renderOfferingsScreen,
remoteConfigs: renderRemoteConfigsScreen,
user: renderUserScreen,
noCodes: renderNoCodesScreen,
Expand All @@ -36,7 +34,6 @@ const screenTitles: Record<string, string> = {
main: 'Qonversion SDK Demo',
products: 'Products',
entitlements: 'Entitlements',
offerings: 'Offerings',
remoteConfigs: 'Remote Configs',
user: 'User',
noCodes: 'No-Codes',
Expand All @@ -49,13 +46,6 @@ function renderMoreScreen(): string {
<div class="section">
<h2 class="section-title">Additional Features</h2>
<div class="list">
<div class="list-item" data-navigate="offerings">
<div class="list-item-content">
<div class="list-item-title">📋 Offerings</div>
<div class="list-item-subtitle">View available offerings and products</div>
</div>
<span class="list-item-arrow">›</span>
</div>
<div class="list-item" data-navigate="remoteConfigs">
<div class="list-item-content">
<div class="list-item-title">⚙️ Remote Configs</div>
Expand Down Expand Up @@ -196,7 +186,7 @@ function updateNavigation(): void {
navItems.forEach(item => {
const screen = item.getAttribute('data-screen');
item.classList.toggle('active', screen === currentScreen ||
(screen === 'more' && ['offerings', 'remoteConfigs', 'noCodes', 'other'].includes(currentScreen)));
(screen === 'more' && ['remoteConfigs', 'noCodes', 'other'].includes(currentScreen)));
});

// Update header
Expand Down Expand Up @@ -241,9 +231,6 @@ function setupScreenEventListeners(screen: string): void {
case 'entitlements':
import('./screens/EntitlementsScreen').then(m => m.setupEntitlementsScreenEvents?.());
break;
case 'offerings':
import('./screens/OfferingsScreen').then(m => m.setupOfferingsScreenEvents?.());
break;
case 'remoteConfigs':
import('./screens/RemoteConfigsScreen').then(m => m.setupRemoteConfigsScreenEvents?.());
break;
Expand Down
4 changes: 0 additions & 4 deletions example/src/app/screens/MainScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ export function renderMainScreen(): string {
<span class="menu-item-icon">🎫</span>
<span class="menu-item-title">Entitlements</span>
</div>
<div class="menu-item" data-navigate="offerings">
<span class="menu-item-icon">📋</span>
<span class="menu-item-title">Offerings</span>
</div>
<div class="menu-item" data-navigate="remoteConfigs">
<span class="menu-item-icon">⚙️</span>
<span class="menu-item-title">Remote Configs</span>
Expand Down
207 changes: 0 additions & 207 deletions example/src/app/screens/OfferingsScreen.ts

This file was deleted.

10 changes: 2 additions & 8 deletions example/src/app/store.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Product, Offerings, Entitlement, RemoteConfigList, User } from '@qonversion/capacitor-plugin';
import type { Product, Entitlement, RemoteConfigList, User } from '@qonversion/capacitor-plugin';

export interface AppState {
currentScreen: string;
Expand All @@ -11,7 +11,6 @@ export interface AppState {
// Data
userInfo: User | null;
products: Map<string, Product> | null;
offerings: Offerings | null;
entitlements: Map<string, Entitlement> | null;
remoteConfigs: RemoteConfigList | null;

Expand All @@ -32,7 +31,6 @@ export type AppAction =
| { type: 'SET_NOCODES_INITIALIZED'; payload: boolean }
| { type: 'SET_USER_INFO'; payload: User | null }
| { type: 'SET_PRODUCTS'; payload: Map<string, Product> }
| { type: 'SET_OFFERINGS'; payload: Offerings }
| { type: 'SET_ENTITLEMENTS'; payload: Map<string, Entitlement> }
| { type: 'SET_REMOTE_CONFIGS'; payload: RemoteConfigList }
| { type: 'ADD_NOCODES_EVENT'; payload: string }
Expand All @@ -49,7 +47,6 @@ const initialState: AppState = {
noCodesInitialized: false,
userInfo: null,
products: null,
offerings: null,
entitlements: null,
remoteConfigs: null,
noCodesEvents: [],
Expand Down Expand Up @@ -114,10 +111,7 @@ class Store {

case 'SET_PRODUCTS':
return { ...state, products: action.payload };

case 'SET_OFFERINGS':
return { ...state, offerings: action.payload };


case 'SET_ENTITLEMENTS':
return { ...state, entitlements: action.payload };

Expand Down
Loading