From 1729e79a8affd583cb78311cffe36335b3ea99e0 Mon Sep 17 00:00:00 2001 From: Matthew Heroux Date: Tue, 6 Feb 2024 23:29:07 -0600 Subject: [PATCH] feat: add footer links to admin client (#802) Signed-off-by: Matthew Heroux --- clients/admin-client/.env.dist | 1 + clients/admin-client/src/App.tsx | 9 +++++++-- clients/admin-client/stacks/admin-client.stack.ts | 2 ++ clients/admin-client/tsconfig-build.json | 8 +++++++- common/config/rush/browser-approved-packages.json | 4 ++++ 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 clients/admin-client/.env.dist diff --git a/clients/admin-client/.env.dist b/clients/admin-client/.env.dist new file mode 100644 index 00000000..588ada9d --- /dev/null +++ b/clients/admin-client/.env.dist @@ -0,0 +1 @@ +VITE_PARENT_DOMAIN_NAME=sandbox.nekosgate.com diff --git a/clients/admin-client/src/App.tsx b/clients/admin-client/src/App.tsx index 90495d53..6d3d11fd 100644 --- a/clients/admin-client/src/App.tsx +++ b/clients/admin-client/src/App.tsx @@ -3,6 +3,8 @@ import { PageFooter, faGithub } from '@cats-cradle/design-system/dist/main'; import { Router } from './routing/Router'; function App() { + const parentDomainName = import.meta.env.VITE_PARENT_DOMAIN_NAME ?? 'sandbox.nekosgate.com'; + return ( <> @@ -10,9 +12,12 @@ function App() { socialMedias={[ {icon: faGithub, label: 'Github', url: 'https://github.com/hxtree/cats-cradle'}, ]} - links={[]} siteOwner="Cats Cradle" - /> + links={[ + {url: `https://jukebox.${parentDomainName}`, label: 'Jukebox'}, + {url: `https://design.${parentDomainName}`, label: 'Design System'}, + {url: `https://api.${parentDomainName}`, label: 'Developer API'}, + ]}/> ); } diff --git a/clients/admin-client/stacks/admin-client.stack.ts b/clients/admin-client/stacks/admin-client.stack.ts index 64c8655d..da49cc97 100644 --- a/clients/admin-client/stacks/admin-client.stack.ts +++ b/clients/admin-client/stacks/admin-client.stack.ts @@ -29,6 +29,7 @@ export class AdminClientStack extends cdk.Stack { bucketName: `${awsAccountId}-${stageName}-admin-client-bucket`, accessControl: BucketAccessControl.PRIVATE, removalPolicy: RemovalPolicy.DESTROY, + autoDeleteObjects: true, }); const originAccessIdentity = new OriginAccessIdentity( @@ -93,6 +94,7 @@ export class AdminClientStack extends cdk.Stack { new BucketDeployment(this, 'BucketDeployment', { destinationBucket: bucket, sources: [Source.asset('./dist')], + retainOnDelete: false, }); const hostedZone = route53.PublicHostedZone.fromHostedZoneAttributes( diff --git a/clients/admin-client/tsconfig-build.json b/clients/admin-client/tsconfig-build.json index facbdcab..fd769487 100644 --- a/clients/admin-client/tsconfig-build.json +++ b/clients/admin-client/tsconfig-build.json @@ -1,4 +1,10 @@ { "extends": "./tsconfig.json", - "include": ["src", "bin", "stacks"] + "include": ["src", "bin", "stacks"], + "compilerOptions": { + "lib": ["dom"], + + "module": "es2022", + "moduleResolution": "Node" + } } diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 0d227a16..9d0390d6 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -866,6 +866,10 @@ "name": "vite-plugin-dts", "allowedCategories": [ "apis", "clients" ] }, + { + "name": "vite-plugin-environment", + "allowedCategories": [ "clients" ] + }, { "name": "vite-plugin-lib-inject-css", "allowedCategories": [ "apis", "clients" ]