Skip to content

Commit 21cb734

Browse files
docs: Update README for GitHub Pages configuration and enhance loading state handling in UI components
1 parent 54dcd2d commit 21cb734

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.github/workflows/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868

6969
- name: Setup Pages
7070
uses: actions/configure-pages@v4
71+
with:
72+
enablement: true
7173

7274
- name: Upload artifact
7375
uses: actions/upload-pages-artifact@v3

README.MD

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ npm install
3737
npm run build
3838
```
3939

40-
### 4. Deploy and Commit
40+
### 4. Configure Your Github Pages Settings ⚠️
41+
In your repository, go to Settings → Pages → Source, and change it from "Deploy from a branch" to "GitHub Actions"
42+
43+
### 5. Deploy and Commit
4144
```bash
4245
git add .
4346
git commit -m "Complete all the TODOs"
@@ -46,6 +49,8 @@ git push origin main
4649

4750
## Live Deployment
4851

52+
⚠️ **IMPORTANT:** You need to configure your GitHub Pages settings (step 4 above) in order to see your deployed app!
53+
4954
Once you push your changes to the `main` branch:
5055

5156
1. **GitHub Actions** will automatically:

ui/src/components/Arenas.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function Arenas({ refreshKey, setRefreshKey }: RefreshProps) {
7878
},
7979
},
8080
{
81-
enabled: !!packageId && !!battleEvents?.data?.length,
81+
enabled: !!packageId && battleEvents?.data !== undefined,
8282
queryKey: [
8383
"multiGetObjects",
8484
"Arenas",
@@ -130,7 +130,7 @@ export default function Arenas({ refreshKey, setRefreshKey }: RefreshProps) {
130130
);
131131
}
132132

133-
if (eventsLoading || isPending) {
133+
if (eventsLoading || isPending || !data) {
134134
return (
135135
<Card>
136136
<Text>Loading arenas...</Text>

ui/src/components/SharedObjects.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default function SharedObjects({ refreshKey, setRefreshKey }: RefreshProp
162162
);
163163
}
164164

165-
if (eventsLoading) {
165+
if (eventsLoading || isPending || !data) {
166166
return (
167167
<Card>
168168
<Text>Loading marketplace...</Text>
@@ -181,13 +181,6 @@ export default function SharedObjects({ refreshKey, setRefreshKey }: RefreshProp
181181
);
182182
}
183183

184-
if (isPending || !data) {
185-
return (
186-
<Card>
187-
<Text>Loading marketplace...</Text>
188-
</Card>
189-
);
190-
}
191184

192185
const listedHeroes = data.filter(obj => obj.data?.content && 'fields' in obj.data.content);
193186

0 commit comments

Comments
 (0)