fix: update frontend deploy pipeline
This commit is contained in:
parent
6bf6a96036
commit
335c3a49c8
1 changed files with 111 additions and 98 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import { useAuth } from "@/context/AuthContext";
|
||||||
import {
|
import {
|
||||||
ShieldCheckIcon,
|
ShieldCheckIcon,
|
||||||
TruckIcon,
|
TruckIcon,
|
||||||
|
|
@ -18,6 +19,7 @@ import {
|
||||||
* Apresenta informações sobre o projeto e opções de login/cadastro
|
* Apresenta informações sobre o projeto e opções de login/cadastro
|
||||||
*/
|
*/
|
||||||
const HomePage = () => {
|
const HomePage = () => {
|
||||||
|
const { user, loading } = useAuth();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-green-50">
|
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-green-50">
|
||||||
|
|
@ -45,6 +47,15 @@ const HomePage = () => {
|
||||||
>
|
>
|
||||||
FAQ
|
FAQ
|
||||||
</Link>
|
</Link>
|
||||||
|
{!loading && user ? (
|
||||||
|
<Link
|
||||||
|
href="/dashboard"
|
||||||
|
className="bg-blue-600 text-white px-4 sm:px-6 py-2 rounded-lg text-sm sm:text-base font-medium hover:bg-blue-700 transition-colors"
|
||||||
|
>
|
||||||
|
Dashboard
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
<Link
|
<Link
|
||||||
href="/login"
|
href="/login"
|
||||||
className="bg-white text-blue-600 px-2 sm:px-4 py-2 rounded-lg text-sm sm:text-base font-medium hover:bg-gray-50 transition-colors"
|
className="bg-white text-blue-600 px-2 sm:px-4 py-2 rounded-lg text-sm sm:text-base font-medium hover:bg-gray-50 transition-colors"
|
||||||
|
|
@ -57,6 +68,8 @@ const HomePage = () => {
|
||||||
>
|
>
|
||||||
Cadastrar-se
|
Cadastrar-se
|
||||||
</Link>
|
</Link>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -91,10 +104,10 @@ const HomePage = () => {
|
||||||
{/* CTA Buttons */}
|
{/* CTA Buttons */}
|
||||||
<div className="flex flex-col sm:flex-row gap-6 justify-center items-center mb-16">
|
<div className="flex flex-col sm:flex-row gap-6 justify-center items-center mb-16">
|
||||||
<Link
|
<Link
|
||||||
href="/login?tab=cadastro"
|
href={!loading && user ? "/dashboard" : "/login?tab=cadastro"}
|
||||||
className="group bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white px-10 py-4 rounded-xl text-lg font-semibold transition-all duration-500 ease-out inline-flex items-center justify-center shadow-lg hover:shadow-xl transform hover:-translate-y-1 hover:scale-105 min-w-[200px]"
|
className="group bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white px-10 py-4 rounded-xl text-lg font-semibold transition-all duration-500 ease-out inline-flex items-center justify-center shadow-lg hover:shadow-xl transform hover:-translate-y-1 hover:scale-105 min-w-[200px]"
|
||||||
>
|
>
|
||||||
Começar Agora
|
{!loading && user ? "Ir para Dashboard" : "Começar Agora"}
|
||||||
</Link>
|
</Link>
|
||||||
<button
|
<button
|
||||||
onClick={() => document.getElementById('features')?.scrollIntoView({ behavior: 'smooth' })}
|
onClick={() => document.getElementById('features')?.scrollIntoView({ behavior: 'smooth' })}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue