diff --git a/.github/workflows/pr-npm.yml b/.github/workflows/pr-npm.yml new file mode 100644 index 0000000000..3a348e6179 --- /dev/null +++ b/.github/workflows/pr-npm.yml @@ -0,0 +1,14 @@ +name: Build GUI +on: pull_request +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup npm + uses: actions/setup-node@v4 + - name: Build npm + run: | + cd src/tribler/ui/ + npm install + npm run build diff --git a/src/tribler/ui/src/pages/Settings/Anonymity.tsx b/src/tribler/ui/src/pages/Settings/Anonymity.tsx index 5b00d7ff2d..49869b4920 100644 --- a/src/tribler/ui/src/pages/Settings/Anonymity.tsx +++ b/src/tribler/ui/src/pages/Settings/Anonymity.tsx @@ -12,7 +12,7 @@ export default function Anonimity() { if (!settings) { (async () => { setSettings(await triblerService.getSettings()) })(); - return; + return null; } return ( diff --git a/src/tribler/ui/src/pages/Settings/Bandwidth.tsx b/src/tribler/ui/src/pages/Settings/Bandwidth.tsx index 17429426e5..9cbecfa2fc 100644 --- a/src/tribler/ui/src/pages/Settings/Bandwidth.tsx +++ b/src/tribler/ui/src/pages/Settings/Bandwidth.tsx @@ -13,7 +13,7 @@ export default function Bandwith() { if (!settings) { (async () => { setSettings(await triblerService.getSettings()) })(); - return; + return null; } return ( diff --git a/src/tribler/ui/src/pages/Settings/Connection.tsx b/src/tribler/ui/src/pages/Settings/Connection.tsx index edcf324b32..f6c02a38ba 100644 --- a/src/tribler/ui/src/pages/Settings/Connection.tsx +++ b/src/tribler/ui/src/pages/Settings/Connection.tsx @@ -15,7 +15,7 @@ export default function Connection() { if (!settings) { (async () => { setSettings(await triblerService.getSettings()) })(); - return; + return null; } return ( diff --git a/src/tribler/ui/src/pages/Settings/Debugging.tsx b/src/tribler/ui/src/pages/Settings/Debugging.tsx index 4e53fc0b40..3432a375b2 100644 --- a/src/tribler/ui/src/pages/Settings/Debugging.tsx +++ b/src/tribler/ui/src/pages/Settings/Debugging.tsx @@ -12,7 +12,7 @@ export default function Debugging() { if (!settings) { (async () => { setSettings(await triblerService.getSettings()) })(); - return; + return null; } return ( diff --git a/src/tribler/ui/src/pages/Settings/General.tsx b/src/tribler/ui/src/pages/Settings/General.tsx index 6758243411..595dfe2dd5 100644 --- a/src/tribler/ui/src/pages/Settings/General.tsx +++ b/src/tribler/ui/src/pages/Settings/General.tsx @@ -15,7 +15,7 @@ export default function General() { if (!settings) { (async () => { setSettings(await triblerService.getSettings()) })(); - return; + return null; } return ( diff --git a/src/tribler/ui/src/pages/Settings/Seeding.tsx b/src/tribler/ui/src/pages/Settings/Seeding.tsx index 156104abc2..9191915579 100644 --- a/src/tribler/ui/src/pages/Settings/Seeding.tsx +++ b/src/tribler/ui/src/pages/Settings/Seeding.tsx @@ -14,7 +14,7 @@ export default function Seeding() { if (!settings) { (async () => { setSettings(await triblerService.getSettings()) })(); - return; + return null; } return (