Refactor Navbar component to simplify button class names by removing conditional logic for styling. This improves readability and maintains consistent styling for logout buttons based on user state.
This commit is contained in:
parent
37531f2b2b
commit
43d0eae01f
@ -133,13 +133,7 @@ export function Navbar() {
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className={`hover:opacity-90 hover:scale-105 transition-all text-xs sm:text-sm ${
|
||||
isUserRoute
|
||||
? 'bg-red-600 hover:bg-red-700 text-white border-red-600 hover:border-red-700'
|
||||
: isDark
|
||||
? 'border-gray-700 text-gray-300 hover:bg-gray-800'
|
||||
: ''
|
||||
}`}
|
||||
className="bg-red-600 hover:bg-red-700 text-white border-red-600 hover:border-red-700 hover:opacity-90 hover:scale-105 transition-all text-xs sm:text-sm"
|
||||
onClick={handleLogout}
|
||||
>
|
||||
<LogOut className="w-4 h-4 mr-2" />
|
||||
@ -243,13 +237,7 @@ export function Navbar() {
|
||||
{isAuthenticated && (
|
||||
<Button
|
||||
variant="outline"
|
||||
className={`w-full justify-start text-sm sm:text-base ${
|
||||
isUserRoute
|
||||
? 'bg-red-600 hover:bg-red-700 text-white border-red-600 hover:border-red-700'
|
||||
: isDark
|
||||
? 'border-gray-700 text-gray-300 hover:bg-gray-800'
|
||||
: ''
|
||||
}`}
|
||||
className="w-full justify-start text-sm sm:text-base bg-red-600 hover:bg-red-700 text-white border-red-600 hover:border-red-700"
|
||||
onClick={() => {
|
||||
handleLogout();
|
||||
}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user