mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: cleanup
This commit is contained in:
1 parent
bc8cfc9897
commit
5adf90bab2
24 files changed
+375
-126
No files matched your search
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "website-ue",
|
||||
"name": "@blitzkit/website-ue",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzkit/core": "workspace:*",
|
||||
"@blitzkit/i18n": "workspace:*",
|
||||
"@blitzkit/closed": "workspace:*",
|
||||
"@astrojs/react": "^4.3.0",
|
||||
"@types/react": "^19.1.5",
|
||||
"@types/react-dom": "^19.1.5",
|
||||
|
||||
@@ -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 />
|
||||
@@ -4,6 +4,7 @@
|
||||
"exclude": ["dist"],
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "react"
|
||||
"jsxImportSource": "react",
|
||||
"baseUrl": "../../"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user