Skip to content

Commit

Permalink
Merge pull request #45 from deniodev/dev
Browse files Browse the repository at this point in the history
Update the UI
  • Loading branch information
deniodev authored Jun 12, 2024
2 parents 97e4019 + 6849f0d commit e7ae9ad
Show file tree
Hide file tree
Showing 8 changed files with 296 additions and 309 deletions.
28 changes: 6 additions & 22 deletions client/src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Menu, Search, CircleUserRound, X } from 'lucide-react';
import { Menu, CircleUserRound } from 'lucide-react';
import { Link, useNavigate } from 'react-router-dom';
import { useSelector } from 'react-redux';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Button } from './ui/button';
import { Input } from './ui/input';
import { Sheet, SheetContent, SheetTrigger, SheetClose } from './ui/sheet';
import ModeToggle from './mode-toggle';
import LanguageSwitcher from './LanguageSwitcher/index';
Expand Down Expand Up @@ -33,10 +32,6 @@ export default function Header() {
}
}, []);

const handleClear = () => {
setSearchTerm('');
};

return (
<div className="border-b">
<header className="flex h-16 items-center gap-4 bg-background max-w-screen-xl mx-auto p-3">
Expand Down Expand Up @@ -109,22 +104,11 @@ export default function Header() {
onSubmit={handleSubmit}
className="ml-auto flex-1 sm:flex-initial"
>
<div className="relative">
<Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />
<Input
type="text"
placeholder={t('search')}
className="pl-8 pr-8 sm:w-[300px] md:w-[200px] lg:w-[300px]"
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
/>
{searchTerm && (
<X
className="absolute right-2.5 top-2.5 h-4 w-4 text-muted-foreground cursor-pointer"
onClick={handleClear}
/>
)}
</div>
<Link to="/create-service">
<Button className="uppercase font-bold" variant="ringHover">
{t('createservice')}
</Button>
</Link>
</form>
<LanguageSwitcher />
<ModeToggle />
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/ui/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const buttonVariants = cva(
'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'text-primary underline-offset-4 hover:underline',
ringHover:
'bg-primary text-primary-foreground transition-all duration-300 hover:bg-primary/90 hover:ring-2 hover:ring-primary/90 dark:hover:ring-gray hover:ring-offset-2',
},
size: {
default: 'h-9 px-4 py-2',
Expand Down
9 changes: 7 additions & 2 deletions client/src/i18n/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"gallery": "Gallery",
"reviews": "Reviews",
"yourmessage": "Enter your message here",
"isApproved": "To obtain approval, update all your profile data and the gallery with photos of recent work.",
"isApproved": "Your service has been created successfully. We will review and approve within 24 hours.",
"pleasewait": "Please wait...",
"book": "Book Now",
"aboutp1": "GetServices is an online platform developed especially for help Mozambicans advertise and find services from different areas. This way, customers can quickly find ideal service providers for your needs, so practical and efficient.",
Expand All @@ -109,6 +109,11 @@
"booking2": " Our platform makes it simple to search for and book services from trusted providers in your area. Just a few clicks and you're on your way to getting the help you need.",
"register": "How to Register a Service?",
"register2": "Showcase Your Services to Potential Customers",
"register3": "Our platform makes it easy for service providers to create a profile and showcase their offerings. Reach a wider audience and connect with more customers than ever before."
"register3": "Our platform makes it easy for service providers to create a profile and showcase their offerings. Reach a wider audience and connect with more customers than ever before.",
"createservice2": "Fill out the form to register your service.",
"uploaderror": "Image upload failed (4 MB max per image).",
"uploaderror2": "You can only upload 1 image for the cover.",
"uploaderror3": "You can only upload 6 images per service.",
"other": "Others"
}
}
17 changes: 11 additions & 6 deletions client/src/i18n/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"imageuploaderror": "Erro ao carregar a imagem (a imagem deve ter menos de 4 MB)",
"imageupload": "Imagem carregada com êxito!",
"updateprofile": "Atualizar Perfil",
"createservice": "Criar Serviço",
"createservice": "Cadastrar Serviço",
"deleteaccount": "Apagar a Conta",
"showservices": "Mostrar Serviços",
"showservices": "Meus Serviços",
"delete": "Eliminar",
"edit": "Editar",
"servicename": "Digite o nome do seu serviço aqui.",
Expand All @@ -58,8 +58,8 @@
"title1": "Ex: Electricista",
"category": "Categoria",
"selectcategory": "Selecione a Categoria",
"coverimg": "Imagem de Capa",
"galleryimgs": "Imagens da Galeria de Serviço",
"coverimg": "Imagem de Capa ",
"galleryimgs": "Imagens da Galeria de Serviço (max 6)",
"creating": "Criando...",
"signout": "Sair",
"updateservice": "Atualizar Serviço",
Expand All @@ -82,7 +82,7 @@
"gallery": "Galeria",
"reviews": "Avaliações",
"yourmessage": "Digite sua mensagem aqui",
"isApproved": "Para obter aprovação, atualize todos os dados do seu serviço e a galeria com fotografias de trabalhos recentes.",
"isApproved": "O seu serviço foi criado com sucesso. Nós iremos analisar e aprovar dentro de 24 horas.",
"pleasewait": "Aguarde...",
"book": "Agendar",
"aboutp1": "GetServices é uma plataforma online desenvolvida especialmente para ajudar os moçambicanos a anunciar e encontrar serviços de diversas áreas. Dessa forma, os clientes podem encontrar rapidamente os prestadores de serviços ideais para suas necessidades, de maneira prática e eficiente.",
Expand All @@ -109,6 +109,11 @@
"booking2": "Nossa plataforma simplifica a busca e reserva de serviços de fornecedores confiáveis ​​em sua área. Apenas alguns cliques e você estará no caminho certo para obter a ajuda necessária.",
"register": "Como Cadastrar um Serviço?",
"register2": "Mostre seus serviços para potenciais clientes",
"register3": "Nossa plataforma torna mais fácil para os provedores de serviços criarem um perfil e apresentarem suas ofertas. Alcance um público mais amplo e conecte-se com mais clientes do que nunca."
"register3": "Nossa plataforma torna mais fácil para os provedores de serviços criarem um perfil e apresentarem suas ofertas. Alcance um público mais amplo e conecte-se com mais clientes do que nunca.",
"createservice2": "Preencha o formulário para cadastrar o seu serviço.",
"uploaderror": "Falha no upload da imagem (máximo de 4 MB por imagem).",
"uploaderror2": "Você só pode fazer upload de 1 imagem para a capa.",
"uploaderror3": "Você só pode fazer upload de 6 imagens da galeria por serviço.",
"other": "Outros"
}
}
Loading

0 comments on commit e7ae9ad

Please sign in to comment.