Skip to content

Commit

Permalink
Merge pull request #103 from kloudlite/feat/skelton-implementation
Browse files Browse the repository at this point in the history
adds skelton implementation for packages
  • Loading branch information
abdheshnayak authored Feb 28, 2024
2 parents 66c1579 + b38a6d2 commit 5eb1d65
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
5 changes: 4 additions & 1 deletion fake-data-generator/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ const types: string[] = [
'ConsoleListProjectMSvsQuery',
'ConsoleListMSvTemplatesQuery',
'ConsoleListRoutersQuery',
'ConsoleListManagedResourcesQuery'
'ConsoleListManagedResourcesQuery',
'ConsoleListDigestQuery',
'ConsoleListBuildsQuery',
'ConsoleListBuildRunsQuery',
];

async function fake(files: string[], types: string[] = []) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const BuildRuns = () => {
<LoadingComp
data={promise}
skeletonData={{
buildRunData: fake.ConsoleListNodePoolsQuery.infra_listNodePools as any,
buildRunData: fake.ConsoleListBuildRunsQuery.cr_listBuildRuns as any,
}}
>
{({ buildRunData }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Button } from '~/components/atoms/button';
import BuildResources from './build-resources';
import HandleBuild from './handle-builds';
import Tools from './tools';
import fake from "~/root/fake-data-generator/fake";

export const loader = async (ctx: IRemixCtx) => {
const { repo } = ctx.params;
Expand Down Expand Up @@ -42,7 +43,12 @@ const Builds = () => {

return (
<>
<LoadingComp data={promise}>
<LoadingComp
data={promise}
skeletonData={{
buildData: fake.ConsoleListBuildsQuery.cr_listBuilds as any,
}}
>
{({ buildData }) => {
const builds = buildData.edges?.map(({ node }) => node);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { IRemixCtx } from '~/root/lib/types/common';
import SecondarySubHeader from '~/console/components/secondary-sub-header';
import TagsResources from './tags-resources';
import Tools from './tools';
import fake from "~/root/fake-data-generator/fake";

export const loader = async (ctx: IRemixCtx) => {
const { repo } = ctx.params;
Expand All @@ -36,7 +37,12 @@ export const loader = async (ctx: IRemixCtx) => {
const Images = () => {
const { promise } = useLoaderData<typeof loader>();
return (
<LoadingComp data={promise}>
<LoadingComp
data={promise}
skeletonData={{
tagsData: fake.ConsoleListDigestQuery.cr_listDigests as any,
}}
>
{({ tagsData }) => {
const tags = tagsData.edges?.map(({ node }) => node);

Expand Down

0 comments on commit 5eb1d65

Please sign in to comment.