mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: cleanup
This commit is contained in:
1 parent
bc8cfc9897
commit
5adf90bab2
24 files changed
+375
-126
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { use } from 'react';
|
||||
|
||||
export function TestComponent() {
|
||||
const content = use(
|
||||
fetch('https://example.com/').then((response) => response.text()),
|
||||
);
|
||||
|
||||
return <pre children={content} />;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { DiscreteMetadataAccessor } from 'packages/core/src';
|
||||
|
||||
export const discreteMetadata = new DiscreteMetadataAccessor('/api/catalog');
|
||||
@@ -0,0 +1,9 @@
|
||||
import { requestAutoProxyClient, unpackMetadata } from '@blitzkit/closed';
|
||||
import type { GetPackedMetadataAsyncResponse } from '@blitzkit/closed/src/unreal/protos/auto_legacy_proxy_client';
|
||||
import { UnpackedMetadataAccessor } from 'packages/core/src';
|
||||
|
||||
export const unpackedMetadata = new UnpackedMetadataAccessor(
|
||||
await requestAutoProxyClient<GetPackedMetadataAsyncResponse>(
|
||||
'GetPackedMetadataAsyncRequest',
|
||||
).then(unpackMetadata),
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
import { CatalogItemsComponent } from '@protos/blitz_static_catalog_items_group_component';
|
||||
import { TestComponent } from '../../../components/TestComponent';
|
||||
import { unpackedMetadata } from '../../../core/blitz/unpackedMetadata';
|
||||
export { getStaticPaths } from '../index.astro';
|
||||
|
||||
const { locale } = Astro.props;
|
||||
|
||||
const allTanks = unpackedMetadata
|
||||
.get('CatalogItemsGroupEntity.all_tanks')
|
||||
.get(CatalogItemsComponent, 'catalogItemsGroupComponent');
|
||||
---
|
||||
|
||||
<TestComponent />
|
||||
Reference in new issue
Block a user