diff --git a/.github/workflows/build_check.yaml b/.github/workflows/build_check.yaml new file mode 100644 index 00000000..94eb409e --- /dev/null +++ b/.github/workflows/build_check.yaml @@ -0,0 +1,28 @@ +name: Build Check + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install and Build + env: + FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} + run: | + npm config set "@fortawesome:registry" https://npm.fontawesome.com/ + npm config set "//npm.fontawesome.com/:_authToken" FONTAWESOME_NPM_AUTH_TOKEN + npm ci + npm run build diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index da3d0631..9acb5fa9 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -7,7 +7,7 @@ on: env: IS_GH_PAGES: gh-pages - + jobs: build-and-deploy: runs-on: ubuntu-latest @@ -19,7 +19,7 @@ jobs: - name: Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: npm - name: Install and Build diff --git a/src/components/common/FeatureCard/types.ts b/src/components/common/FeatureCard/types.ts index 7da6c5a9..9c4012cb 100644 --- a/src/components/common/FeatureCard/types.ts +++ b/src/components/common/FeatureCard/types.ts @@ -1,4 +1,5 @@ export type FeatureCardProps = { children: React.ReactNode disabled?: boolean + disabledText?: string } diff --git a/src/components/pages/dashboard/index/AllTabContent/cmp.tsx b/src/components/pages/dashboard/index/AllTabContent/cmp.tsx index 47d592f5..fe746925 100644 --- a/src/components/pages/dashboard/index/AllTabContent/cmp.tsx +++ b/src/components/pages/dashboard/index/AllTabContent/cmp.tsx @@ -36,7 +36,7 @@ export const AllTabContent = React.memo(({ data }: AllTabContentProps) => { label: 'Size', align: 'right', sortable: true, - render: (row) => humanReadableSize(row.size, 'mb'), + render: (row) => humanReadableSize(row.size, 'MiB'), }, { label: 'Date', diff --git a/src/components/pages/dashboard/index/VolumesTabContent/cmp.tsx b/src/components/pages/dashboard/index/VolumesTabContent/cmp.tsx index e0bac414..96500599 100644 --- a/src/components/pages/dashboard/index/VolumesTabContent/cmp.tsx +++ b/src/components/pages/dashboard/index/VolumesTabContent/cmp.tsx @@ -31,7 +31,7 @@ export const VolumesTabContent = React.memo( label: 'Size', align: 'right', sortable: true, - render: (row) => humanReadableSize(row.size || 0, 'mb'), + render: (row) => humanReadableSize(row.size || 0, 'MiB'), }, { label: 'Date', diff --git a/src/components/pages/dashboard/manage/ManageFunction/cmp.tsx b/src/components/pages/dashboard/manage/ManageFunction/cmp.tsx index a0e96b42..6aaab552 100644 --- a/src/components/pages/dashboard/manage/ManageFunction/cmp.tsx +++ b/src/components/pages/dashboard/manage/ManageFunction/cmp.tsx @@ -118,7 +118,7 @@ export default function ManageFunction() {
SIZE
- {humanReadableSize(func.size, 'mb')} + {humanReadableSize(func.size, 'MiB')}
diff --git a/src/components/pages/dashboard/manage/ManageVolume/cmp.tsx b/src/components/pages/dashboard/manage/ManageVolume/cmp.tsx index c0bb0b53..685d26a9 100644 --- a/src/components/pages/dashboard/manage/ManageVolume/cmp.tsx +++ b/src/components/pages/dashboard/manage/ManageVolume/cmp.tsx @@ -100,7 +100,7 @@ export default function ManageVolume() {
SIZE
- {humanReadableSize(volume.size, 'mb')} + {humanReadableSize(volume.size, 'MiB')}
diff --git a/src/components/pages/dashboard/manage/VolumeList/cmp.tsx b/src/components/pages/dashboard/manage/VolumeList/cmp.tsx index 1b2b4c99..557fd7ed 100644 --- a/src/components/pages/dashboard/manage/VolumeList/cmp.tsx +++ b/src/components/pages/dashboard/manage/VolumeList/cmp.tsx @@ -25,7 +25,7 @@ export const VolumeList = React.memo(
PERSISTENT VOLUME
- {humanReadableSize(volume.size_mib, 'mb')} + {humanReadableSize(volume.size_mib, 'MiB')}
@@ -34,7 +34,7 @@ export const VolumeList = React.memo(
EPHEMERAL VOLUME
- {humanReadableSize(volume.size_mib, 'mb')} + {humanReadableSize(volume.size_mib, 'MiB')}
diff --git a/src/domain/volume.ts b/src/domain/volume.ts index 3d7b1850..6e8a1d10 100644 --- a/src/domain/volume.ts +++ b/src/domain/volume.ts @@ -5,7 +5,6 @@ import { EntityType, VolumeType, defaultVolumeChannel, - pricePerMiB, programStorageURL, } from '../helpers/constants' import { diff --git a/src/hooks/common/useForm.ts b/src/hooks/common/useForm.ts index 98c13a5b..473448b9 100644 --- a/src/hooks/common/useForm.ts +++ b/src/hooks/common/useForm.ts @@ -24,7 +24,9 @@ export type UseFormReturn< handleSubmit: (e: FormEvent) => Promise } -function getFirstError(errors: FieldErrors) { +function getFirstError( + errors: FieldErrors, +): [string, any] | undefined { const [firstError] = Object.entries(errors) if (!firstError) return