fix(frontend): ensure consistent width across all matches tabs
- Add w-full to MatchCard for consistent card width - Use Layout noPadding to avoid padding conflicts - Add explicit padding and width control to main container - Ensure All, Pending, and Active tabs have identical width
This commit is contained in:
@@ -125,8 +125,8 @@ const MatchesPage = () => {
|
||||
const otherMatches = filteredMatches.filter(m => !(m.status === MATCH_STATUS.PENDING && !m.isInitiator));
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<div className="max-w-4xl mx-auto">
|
||||
<Layout noPadding>
|
||||
<div className="w-full max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<div className="mb-6">
|
||||
<h1 className="text-3xl font-bold text-gray-900">Match Requests</h1>
|
||||
<p className="text-gray-600 mt-2">
|
||||
@@ -135,7 +135,7 @@ const MatchesPage = () => {
|
||||
</div>
|
||||
|
||||
{/* Filter Tabs */}
|
||||
<div className="bg-white rounded-lg shadow-sm p-1 mb-6 flex gap-1">
|
||||
<div className="w-full bg-white rounded-lg shadow-sm p-1 mb-6 flex gap-1">
|
||||
<button
|
||||
onClick={() => setFilter(MATCH_FILTER.ALL)}
|
||||
className={`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors ${
|
||||
@@ -172,8 +172,20 @@ const MatchesPage = () => {
|
||||
<div className="flex justify-center items-center py-12">
|
||||
<Loader2 className="w-8 h-8 animate-spin text-primary-600" />
|
||||
</div>
|
||||
) : filteredMatches.length === 0 ? (
|
||||
<div className="w-full text-center py-12">
|
||||
<Users className="w-16 h-16 text-gray-300 mx-auto mb-4" />
|
||||
<h3 className="text-lg font-medium text-gray-900 mb-2">
|
||||
No matches found
|
||||
</h3>
|
||||
<p className="text-gray-600">
|
||||
{filter === 'all'
|
||||
? 'You have no match requests yet. Connect with other dancers at events!'
|
||||
: `You have no ${filter} matches.`}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<div className="w-full">
|
||||
{/* Pending Incoming Requests Section */}
|
||||
{pendingIncoming.length > 0 && (
|
||||
<div className="mb-6">
|
||||
@@ -198,7 +210,7 @@ const MatchesPage = () => {
|
||||
|
||||
{/* Other Matches */}
|
||||
{otherMatches.length > 0 && (
|
||||
<div>
|
||||
<div className="mb-6">
|
||||
<h2 className="text-lg font-semibold text-gray-900 mb-3">
|
||||
{pendingIncoming.length > 0 ? 'Other Matches' : 'Your Matches'}
|
||||
</h2>
|
||||
@@ -216,22 +228,7 @@ const MatchesPage = () => {
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Empty State */}
|
||||
{filteredMatches.length === 0 && (
|
||||
<div className="text-center py-12">
|
||||
<Users className="w-16 h-16 text-gray-300 mx-auto mb-4" />
|
||||
<h3 className="text-lg font-medium text-gray-900 mb-2">
|
||||
No matches found
|
||||
</h3>
|
||||
<p className="text-gray-600">
|
||||
{filter === 'all'
|
||||
? 'You have no match requests yet. Connect with other dancers at events!'
|
||||
: `You have no ${filter} matches.`}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Layout>
|
||||
|
||||
Reference in New Issue
Block a user