card editing

This commit is contained in:
Samandar Turgunboyev
2025-12-16 15:48:22 +05:00
parent 8813d50a81
commit a81fa12f53
19 changed files with 193 additions and 120 deletions

View File

@@ -35,6 +35,16 @@ const Navbar = () => {
const [isSticky, setIsSticky] = useState(false);
const [query, setQuery] = useState('');
const searchParams = useSearchParams();
const [user, setUser] = useState<boolean>(false);
const users = localStorage.getItem('user');
useEffect(() => {
if (users && users === 'true') {
setUser(true);
} else {
setUser(false);
}
}, [users]);
const queryFromUrl = searchParams.get('q') ?? '';
@@ -61,7 +71,7 @@ const Navbar = () => {
return (
<>
<div className="w-full bg-blue-600 h-10 max-lg:hidden">
<div className="w-full bg-[#57A595] h-10 max-lg:hidden">
<div className="custom-container h-full flex justify-between items-center">
<ul className="text-sm flex items-center justify-center gap-4">
<li className="text-white transition-colors cursor-pointer">
@@ -195,8 +205,7 @@ const Navbar = () => {
<Button
variant={'ghost'}
onClick={() => {
const user = localStorage.getItem('user');
if (user === 'true') {
if (user) {
router.push('/profile');
} else {
router.push('/auth');