Skip to content

Commit ca701f1

Browse files
pjccclaude
andcommitted
Remove refresh button, compact mobile header layout
- Remove refresh icon and refreshing state - Show "+" instead of "+ Add Pub" on mobile - Keep icon toggle and add button on same line as view tabs on mobile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 877c1af commit ca701f1

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

src/App.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export default function App() {
3636
localStorage.getItem('brighton-pubs-view') || 'cards'
3737
);
3838
const [toast, setToast] = useState(null);
39-
const [refreshing, setRefreshing] = useState(false);
4039
const [search, setSearch] = useState('');
4140
const [sortBy, setSortBy] = useState('name');
4241
const [filters, setFilters] = useState({});
@@ -341,8 +340,6 @@ export default function App() {
341340
<Header
342341
onAdd={() => { setEditingPub(null); setShowForm(true); }}
343342
onSignOut={handleSignOut}
344-
onRefresh={async () => { setRefreshing(true); await loadData(true); setRefreshing(false); }}
345-
refreshing={refreshing}
346343
view={view}
347344
onViewChange={handleViewChange}
348345
theme={theme}

src/components/Header.jsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const THEMES = [
99
];
1010

1111
export default function Header({
12-
onAdd, onSignOut, onRefresh, refreshing,
12+
onAdd, onSignOut,
1313
view, onViewChange, theme, onThemeChange,
1414
userName, unseenCount, pubs,
1515
search, onSearchChange, filters, onFiltersChange,
@@ -74,17 +74,7 @@ export default function Header({
7474
<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>
7575
</svg>
7676
</button>
77-
<button
78-
className={`btn btn-ghost ${refreshing ? 'spin' : ''}`}
79-
onClick={onRefresh}
80-
title="Refresh"
81-
>
82-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
83-
<polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/>
84-
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>
85-
</svg>
86-
</button>
87-
<button className="btn btn-primary" onClick={onAdd}>+ Add Pub</button>
77+
<button className="btn btn-primary" onClick={onAdd}><span className="add-label-full">+ Add Pub</span><span className="add-label-short">+</span></button>
8878
</div>
8979
</div>
9080

src/index.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ a:hover { text-decoration: underline; }
176176
}
177177
.btn-icon:hover { color: var(--text-light); }
178178

179-
.spin svg { animation: spin 0.8s linear infinite; }
179+
.add-label-short { display: none; }
180180

181181
/* ---- Header ---- */
182182
.header {
@@ -1300,6 +1300,15 @@ a:hover { text-decoration: underline; }
13001300
.form-row { grid-template-columns: 1fr; }
13011301
.header-filters { flex-direction: column; }
13021302
.search-input { width: 100%; }
1303+
1304+
.header-nav {
1305+
flex-wrap: nowrap;
1306+
}
1307+
.header-actions {
1308+
margin-left: auto;
1309+
}
1310+
.add-label-full { display: none; }
1311+
.add-label-short { display: inline; }
13031312
}
13041313

13051314
@media (max-width: 380px) {

0 commit comments

Comments
 (0)