Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Broken build #39

Merged
merged 3 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build_check.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
IS_GH_PAGES: gh-pages

jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/components/common/FeatureCard/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export type FeatureCardProps = {
children: React.ReactNode
disabled?: boolean
disabledText?: string
}
2 changes: 1 addition & 1 deletion src/components/pages/dashboard/index/AllTabContent/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function ManageFunction() {
<div className="tp-info text-main0">SIZE</div>
<div>
<GrayText className="fs-xs tp-body1">
{humanReadableSize(func.size, 'mb')}
{humanReadableSize(func.size, 'MiB')}
</GrayText>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/dashboard/manage/ManageVolume/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function ManageVolume() {
<div className="tp-info text-main0">SIZE</div>
<div>
<GrayText className="fs-xs tp-body1">
{humanReadableSize(volume.size, 'mb')}
{humanReadableSize(volume.size, 'MiB')}
</GrayText>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/dashboard/manage/VolumeList/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const VolumeList = React.memo(
<div className="tp-info text-main0">PERSISTENT VOLUME</div>
<div>
<GrayText className="fs-xs tp-body1">
{humanReadableSize(volume.size_mib, 'mb')}
{humanReadableSize(volume.size_mib, 'MiB')}
</GrayText>
</div>
</div>
Expand All @@ -34,7 +34,7 @@ export const VolumeList = React.memo(
<div className="tp-info text-main0">EPHEMERAL VOLUME</div>
<div>
<GrayText className="fs-xs tp-body1">
{humanReadableSize(volume.size_mib, 'mb')}
{humanReadableSize(volume.size_mib, 'MiB')}
</GrayText>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/domain/volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
EntityType,
VolumeType,
defaultVolumeChannel,
pricePerMiB,
programStorageURL,
} from '../helpers/constants'
import {
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/common/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export type UseFormReturn<
handleSubmit: (e: FormEvent) => Promise<void>
}

function getFirstError<T extends FieldValues>(errors: FieldErrors<T>) {
function getFirstError<T extends FieldValues>(
errors: FieldErrors<T>,
): [string, any] | undefined {
const [firstError] = Object.entries(errors)
if (!firstError) return

Expand Down