refactor: restructure storage and environment modules; remove unused code
- Deleted unused PouchDB configuration and types from core storage. - Removed Electron-related hooks and utilities that are no longer needed. - Introduced new local storage management for application keys. - Created a new environment wrapper for landing application. - Added public HTTP client for landing application with minimal configuration. - Implemented new PouchDB entities for items and POS configurations. - Updated main application entry point to reflect new storage structure.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CommonRemoteDataServices } from '@repo/core-api/data-services';
|
||||
import type { BaseEntity } from '@repo/core-api/data-services';
|
||||
import { publicClient } from '../../../lib/api-client';
|
||||
import { publicClient } from '../../../core/lib/api-client';
|
||||
|
||||
// ─── Domain Entity ──────────────────────────────────────────────
|
||||
|
||||
@@ -31,10 +31,7 @@ export interface PublicContentEntity extends BaseEntity {
|
||||
* const { data: post } = await publicContentServices.getOne('hello-world');
|
||||
* ```
|
||||
*/
|
||||
export const publicContentServices = new CommonRemoteDataServices<PublicContentEntity>(
|
||||
publicClient,
|
||||
{
|
||||
apiUrl: '/content',
|
||||
moduleKey: 'PUBLIC_CONTENT',
|
||||
},
|
||||
);
|
||||
export const publicContentServices = new CommonRemoteDataServices<PublicContentEntity>(publicClient, {
|
||||
apiUrl: '/content',
|
||||
moduleKey: 'PUBLIC_CONTENT',
|
||||
});
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useEffect, useState } from 'react';
|
||||
import { useTranslation, changeLanguage, i18n } from '@repo/core-i18n';
|
||||
|
||||
// Decentralized locale imports
|
||||
import homeId from '../locales/id/home.json';
|
||||
import homeEn from '../locales/en/home.json';
|
||||
import homeId from '../core/locales/id/home.json';
|
||||
import homeEn from '../core/locales/en/home.json';
|
||||
|
||||
// Bendera penanda statis di level modul (default: false)
|
||||
let isHomeDictLoaded = false;
|
||||
|
||||
Vendored
+1
-1
@@ -7,7 +7,7 @@ import homeEn from '../locales/en/home.json';
|
||||
declare module 'react-i18next' {
|
||||
interface CustomTypeOptions {
|
||||
defaultNS: 'common';
|
||||
resources: typeof coreResources['en'] & {
|
||||
resources: (typeof coreResources)['en'] & {
|
||||
home: typeof homeEn;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user