atualizacao cards
This commit is contained in:
parent
9e0021b62b
commit
6ceb8c70bb
4 changed files with 314 additions and 28 deletions
|
|
@ -51,7 +51,7 @@
|
|||
--card-foreground: oklch(0.145 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.145 0 0);
|
||||
--primary: oklch(0.686 0.173 55); /* #f0932b Orange */
|
||||
--primary: oklch(0.705 0.188 57.5); /* #f0932b Orange */
|
||||
--primary-foreground: oklch(1 0 0);
|
||||
--secondary: oklch(0.97 0 0);
|
||||
--secondary-foreground: oklch(0.205 0 0);
|
||||
|
|
@ -62,20 +62,20 @@
|
|||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.922 0 0);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.686 0.173 55);
|
||||
--chart-1: oklch(0.686 0.173 55);
|
||||
--ring: oklch(0.705 0.188 57.5);
|
||||
--chart-1: oklch(0.705 0.188 57.5);
|
||||
--chart-2: oklch(0.6 0.118 184.704);
|
||||
--chart-3: oklch(0.398 0.07 227.392);
|
||||
--chart-4: oklch(0.828 0.189 84.429);
|
||||
--chart-5: oklch(0.769 0.188 70.08);
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.145 0 0);
|
||||
--sidebar-primary: oklch(0.686 0.173 55);
|
||||
--sidebar-primary: oklch(0.705 0.188 57.5);
|
||||
--sidebar-primary-foreground: oklch(1 0 0);
|
||||
--sidebar-accent: oklch(0.97 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||||
--sidebar-border: oklch(0.922 0 0);
|
||||
--sidebar-ring: oklch(0.686 0.173 55);
|
||||
--sidebar-ring: oklch(0.705 0.188 57.5);
|
||||
}
|
||||
|
||||
.dark {
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
--card-foreground: oklch(0.985 0 0);
|
||||
--popover: oklch(0.205 0 0);
|
||||
--popover-foreground: oklch(0.985 0 0);
|
||||
--primary: oklch(0.686 0.173 55); /* #f0932b Orange */
|
||||
--primary: oklch(0.705 0.188 57.5); /* #f0932b Orange */
|
||||
--primary-foreground: oklch(1 0 0);
|
||||
--secondary: oklch(0.269 0 0);
|
||||
--secondary-foreground: oklch(0.985 0 0);
|
||||
|
|
@ -96,8 +96,8 @@
|
|||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.686 0.173 55);
|
||||
--chart-1: oklch(0.686 0.173 55);
|
||||
--ring: oklch(0.705 0.188 57.5);
|
||||
--chart-1: oklch(0.705 0.188 57.5);
|
||||
--chart-2: oklch(0.696 0.17 162.48);
|
||||
--chart-3: oklch(0.769 0.188 70.08);
|
||||
--chart-4: oklch(0.627 0.265 303.9);
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ export default function HomePage() {
|
|||
isFeatured: j.isFeatured
|
||||
}))
|
||||
|
||||
console.log("[DEBUG] Fetching featured jobs from:", `${apiBase}/api/v1/jobs?featured=true&limit=6`)
|
||||
const featuredRes = await fetch(`${apiBase}/api/v1/jobs?featured=true&limit=6`)
|
||||
console.log("[DEBUG] Fetching featured jobs from:", `${apiBase}/api/v1/jobs?featured=true&limit=31`)
|
||||
const featuredRes = await fetch(`${apiBase}/api/v1/jobs?featured=true&limit=31`)
|
||||
console.log("[DEBUG] Featured response status:", featuredRes.status)
|
||||
|
||||
if (!featuredRes.ok) throw new Error("Failed to fetch featured jobs")
|
||||
|
|
@ -56,14 +56,14 @@ export default function HomePage() {
|
|||
const featuredList = featuredData.data ? mapJobs(featuredData.data) : []
|
||||
console.log("[DEBUG] Mapped featured jobs:", featuredList.length, "jobs")
|
||||
|
||||
if (featuredList.length === 6) {
|
||||
console.log("[DEBUG] Using featured jobs only (6 found)")
|
||||
if (featuredList.length === 31) {
|
||||
console.log("[DEBUG] Using featured jobs only (31 found)")
|
||||
setFeaturedJobs(featuredList)
|
||||
return
|
||||
}
|
||||
|
||||
console.log("[DEBUG] Fetching fallback jobs from:", `${apiBase}/api/v1/jobs?limit=6`)
|
||||
const fallbackRes = await fetch(`${apiBase}/api/v1/jobs?limit=6`)
|
||||
console.log("[DEBUG] Fetching fallback jobs from:", `${apiBase}/api/v1/jobs?limit=31`)
|
||||
const fallbackRes = await fetch(`${apiBase}/api/v1/jobs?limit=31`)
|
||||
console.log("[DEBUG] Fallback response status:", fallbackRes.status)
|
||||
|
||||
if (!fallbackRes.ok) throw new Error("Failed to fetch fallback jobs")
|
||||
|
|
@ -73,23 +73,23 @@ export default function HomePage() {
|
|||
const fallbackList = fallbackData.data ? mapJobs(fallbackData.data) : []
|
||||
console.log("[DEBUG] Mapped fallback jobs:", fallbackList.length, "jobs")
|
||||
|
||||
const combined = [...featuredList, ...fallbackList].slice(0, 6)
|
||||
const combined = [...featuredList, ...fallbackList].slice(0, 31)
|
||||
console.log("[DEBUG] Combined jobs:", combined.length, "jobs")
|
||||
|
||||
if (combined.length === 6) {
|
||||
console.log("[DEBUG] Using combined jobs (6)")
|
||||
if (combined.length === 31) {
|
||||
console.log("[DEBUG] Using combined jobs (31)")
|
||||
setFeaturedJobs(combined)
|
||||
} else if (combined.length > 0) {
|
||||
console.log("[DEBUG] Using combined jobs (less than 6)")
|
||||
console.log("[DEBUG] Using combined jobs (less than 31)")
|
||||
setFeaturedJobs(combined)
|
||||
} else {
|
||||
console.log("[DEBUG] ⚠️ USING MOCK DATA - No API jobs found!")
|
||||
setFeaturedJobs(mockJobs.slice(0, 6))
|
||||
setFeaturedJobs(mockJobs.slice(0, 31))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("[DEBUG] ❌ Error fetching featured jobs:", error)
|
||||
console.log("[DEBUG] ⚠️ USING MOCK DATA due to error")
|
||||
setFeaturedJobs(mockJobs.slice(0, 6))
|
||||
setFeaturedJobs(mockJobs.slice(0, 31))
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ export default function HomePage() {
|
|||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
onClick={() => setFeaturedIndex(Math.max(0, featuredIndex - 4))}
|
||||
onClick={() => setFeaturedIndex(Math.max(0, featuredIndex - 8))}
|
||||
disabled={featuredIndex === 0}
|
||||
className="h-10 w-10"
|
||||
>
|
||||
|
|
@ -279,10 +279,10 @@ export default function HomePage() {
|
|||
variant="outline"
|
||||
size="icon"
|
||||
onClick={() => {
|
||||
const jobs = featuredJobs.length >= 8 ? featuredJobs.slice(0, 8) : mockJobs.slice(0, 8)
|
||||
setFeaturedIndex(Math.min(jobs.length - 4, featuredIndex + 4))
|
||||
const jobs = featuredJobs.length >= 16 ? featuredJobs.slice(0, 16) : mockJobs.slice(0, 16)
|
||||
setFeaturedIndex(Math.min(jobs.length - 8, featuredIndex + 8))
|
||||
}}
|
||||
disabled={featuredIndex >= ((featuredJobs.length >= 8 ? featuredJobs.slice(0, 8) : mockJobs.slice(0, 8)).length - 4)}
|
||||
disabled={featuredIndex >= ((featuredJobs.length >= 16 ? featuredJobs.slice(0, 16) : mockJobs.slice(0, 16)).length - 8)}
|
||||
className="h-10 w-10"
|
||||
>
|
||||
<ChevronRight className="h-5 w-5" />
|
||||
|
|
@ -291,8 +291,8 @@ export default function HomePage() {
|
|||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
{(featuredJobs.length >= 8 ? featuredJobs.slice(0, 8) : mockJobs.slice(0, 8))
|
||||
.slice(featuredIndex, featuredIndex + 4)
|
||||
{(featuredJobs.length >= 16 ? featuredJobs.slice(0, 16) : mockJobs.slice(0, 16))
|
||||
.slice(featuredIndex, featuredIndex + 8)
|
||||
.map((job, index) => {
|
||||
const dates = ['02/06', '05/06', '08/06', '11/06', '14/06', '17/06', '19/06', '20/06'];
|
||||
const randomDate = dates[(featuredIndex + index) % dates.length];
|
||||
|
|
@ -357,7 +357,7 @@ export default function HomePage() {
|
|||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{(featuredJobs.length >= 12 ? featuredJobs.slice(8, 12) : mockJobs.slice(0, 4))
|
||||
{(featuredJobs.length >= 30 ? featuredJobs.slice(16, 30) : mockJobs.slice(0, 14))
|
||||
.map((job, index) => {
|
||||
const dates = ['03/06', '07/06', '10/06', '13/06', '16/06', '18/06'];
|
||||
const randomDate = dates[index % dates.length];
|
||||
|
|
|
|||
|
|
@ -1247,7 +1247,7 @@
|
|||
"hybrid": "Híbrido"
|
||||
},
|
||||
"featuredJobs": {
|
||||
"title": "Vagas em Destaque",
|
||||
"title": "Últimas vagas cadastradas",
|
||||
"yesterday": "Ontem",
|
||||
"apply": "Aplicar agora"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -81,6 +81,292 @@ export const mockJobs: Job[] = [
|
|||
requirements: ["Docker", "Kubernetes", "AWS", "Terraform"],
|
||||
postedAt: "2025-10-10",
|
||||
},
|
||||
{
|
||||
id: "7",
|
||||
title: "Backend Developer",
|
||||
company: "CodeLab",
|
||||
location: "Curitiba, PR",
|
||||
type: "full-time",
|
||||
salary: "R$ 10,000 - R$ 15,000",
|
||||
description: "Develop and maintain scalable backend systems.",
|
||||
requirements: ["Node.js", "PostgreSQL", "REST APIs", "3+ years"],
|
||||
postedAt: "2025-10-09",
|
||||
},
|
||||
{
|
||||
id: "8",
|
||||
title: "QA Analyst",
|
||||
company: "TestPro",
|
||||
location: "Porto Alegre, RS",
|
||||
type: "remote",
|
||||
salary: "R$ 7,000 - R$ 11,000",
|
||||
description: "Ensure quality through comprehensive testing.",
|
||||
requirements: ["Selenium", "Jest", "Test automation", "2+ years"],
|
||||
postedAt: "2025-10-08",
|
||||
},
|
||||
{
|
||||
id: "9",
|
||||
title: "Security Engineer",
|
||||
company: "SecureNet",
|
||||
location: "Brasília, DF",
|
||||
type: "full-time",
|
||||
salary: "R$ 14,000 - R$ 20,000",
|
||||
description: "Protect systems and data from cyber threats.",
|
||||
requirements: ["Security", "Penetration testing", "ISO 27001", "5+ years"],
|
||||
postedAt: "2025-10-07",
|
||||
},
|
||||
{
|
||||
id: "10",
|
||||
title: "Frontend Developer",
|
||||
company: "WebStudio",
|
||||
location: "São Paulo, SP",
|
||||
type: "remote",
|
||||
salary: "R$ 9,000 - R$ 13,000",
|
||||
description: "Create beautiful and responsive user interfaces.",
|
||||
requirements: ["React", "TypeScript", "CSS", "3+ years"],
|
||||
postedAt: "2025-10-06",
|
||||
},
|
||||
{
|
||||
id: "11",
|
||||
title: "Scrum Master",
|
||||
company: "AgileTeam",
|
||||
location: "Rio de Janeiro, RJ",
|
||||
type: "full-time",
|
||||
salary: "R$ 11,000 - R$ 16,000",
|
||||
description: "Lead agile teams to deliver value.",
|
||||
requirements: ["Scrum", "Agile", "Leadership", "CSM certified"],
|
||||
postedAt: "2025-10-05",
|
||||
},
|
||||
{
|
||||
id: "12",
|
||||
title: "Business Analyst",
|
||||
company: "DataInsights",
|
||||
location: "Belo Horizonte, MG",
|
||||
type: "full-time",
|
||||
salary: "R$ 8,000 - R$ 12,000",
|
||||
description: "Analyze business requirements and propose solutions.",
|
||||
requirements: ["SQL", "Power BI", "Business analysis", "2+ years"],
|
||||
postedAt: "2025-10-04",
|
||||
},
|
||||
{
|
||||
id: "13",
|
||||
title: "AI Engineer",
|
||||
company: "SmartAI",
|
||||
location: "São Paulo, SP",
|
||||
type: "full-time",
|
||||
salary: "R$ 16,000 - R$ 24,000",
|
||||
description: "Build intelligent systems using machine learning.",
|
||||
requirements: ["Python", "TensorFlow", "PyTorch", "ML/AI"],
|
||||
postedAt: "2025-10-03",
|
||||
},
|
||||
{
|
||||
id: "14",
|
||||
title: "Database Administrator",
|
||||
company: "DataCore",
|
||||
location: "Campinas, SP",
|
||||
type: "full-time",
|
||||
salary: "R$ 12,000 - R$ 17,000",
|
||||
description: "Manage and optimize database systems.",
|
||||
requirements: ["PostgreSQL", "MySQL", "Performance tuning", "4+ years"],
|
||||
postedAt: "2025-10-02",
|
||||
},
|
||||
{
|
||||
id: "15",
|
||||
title: "Cloud Architect",
|
||||
company: "SkyTech",
|
||||
location: "São Paulo, SP",
|
||||
type: "remote",
|
||||
salary: "R$ 18,000 - R$ 26,000",
|
||||
description: "Design and implement cloud solutions.",
|
||||
requirements: ["AWS", "Azure", "Architecture", "6+ years"],
|
||||
postedAt: "2025-10-01",
|
||||
},
|
||||
{
|
||||
id: "16",
|
||||
title: "Technical Writer",
|
||||
company: "DocuMasters",
|
||||
location: "Remote",
|
||||
type: "remote",
|
||||
salary: "R$ 6,000 - R$ 10,000",
|
||||
description: "Create technical documentation and guides.",
|
||||
requirements: ["Technical writing", "English", "API docs", "2+ years"],
|
||||
postedAt: "2025-09-30",
|
||||
},
|
||||
{
|
||||
id: "17",
|
||||
title: "Sales Engineer",
|
||||
company: "TechSales",
|
||||
location: "São Paulo, SP",
|
||||
type: "full-time",
|
||||
salary: "R$ 13,000 - R$ 19,000",
|
||||
description: "Combine technical knowledge with sales skills.",
|
||||
requirements: ["Sales", "Technical background", "Presentations", "3+ years"],
|
||||
postedAt: "2025-09-29",
|
||||
},
|
||||
{
|
||||
id: "18",
|
||||
title: "System Administrator",
|
||||
company: "ITOps",
|
||||
location: "Recife, PE",
|
||||
type: "full-time",
|
||||
salary: "R$ 9,000 - R$ 14,000",
|
||||
description: "Maintain and monitor IT infrastructure.",
|
||||
requirements: ["Linux", "Windows Server", "Networking", "3+ years"],
|
||||
postedAt: "2025-09-28",
|
||||
},
|
||||
{
|
||||
id: "19",
|
||||
title: "Game Developer",
|
||||
company: "GameStudio",
|
||||
location: "São Paulo, SP",
|
||||
type: "remote",
|
||||
salary: "R$ 11,000 - R$ 16,000",
|
||||
description: "Create engaging gaming experiences.",
|
||||
requirements: ["Unity", "C#", "3D modeling", "Game design"],
|
||||
postedAt: "2025-09-27",
|
||||
},
|
||||
{
|
||||
id: "20",
|
||||
title: "Marketing Analyst",
|
||||
company: "GrowthLab",
|
||||
location: "Rio de Janeiro, RJ",
|
||||
type: "full-time",
|
||||
salary: "R$ 7,000 - R$ 11,000",
|
||||
description: "Drive marketing strategies with data.",
|
||||
requirements: ["Marketing", "Google Analytics", "SEO", "2+ years"],
|
||||
postedAt: "2025-09-26",
|
||||
},
|
||||
{
|
||||
id: "21",
|
||||
title: "HR Specialist",
|
||||
company: "PeopleFirst",
|
||||
location: "Belo Horizonte, MG",
|
||||
type: "full-time",
|
||||
salary: "R$ 6,000 - R$ 9,000",
|
||||
description: "Manage recruitment and employee relations.",
|
||||
requirements: ["HR", "Recruitment", "Employee relations", "2+ years"],
|
||||
postedAt: "2025-09-25",
|
||||
},
|
||||
{
|
||||
id: "22",
|
||||
title: "Network Engineer",
|
||||
company: "NetWorks",
|
||||
location: "Brasília, DF",
|
||||
type: "full-time",
|
||||
salary: "R$ 12,000 - R$ 17,000",
|
||||
description: "Design and maintain network infrastructure.",
|
||||
requirements: ["Cisco", "CCNA", "Networking", "4+ years"],
|
||||
postedAt: "2025-09-24",
|
||||
},
|
||||
{
|
||||
id: "23",
|
||||
title: "Blockchain Developer",
|
||||
company: "CryptoTech",
|
||||
location: "São Paulo, SP",
|
||||
type: "remote",
|
||||
salary: "R$ 15,000 - R$ 22,000",
|
||||
description: "Build decentralized applications.",
|
||||
requirements: ["Solidity", "Ethereum", "Smart contracts", "3+ years"],
|
||||
postedAt: "2025-09-23",
|
||||
},
|
||||
{
|
||||
id: "24",
|
||||
title: "Solutions Architect",
|
||||
company: "TechSolutions",
|
||||
location: "São Paulo, SP",
|
||||
type: "full-time",
|
||||
salary: "R$ 17,000 - R$ 25,000",
|
||||
description: "Design comprehensive technical solutions.",
|
||||
requirements: ["Architecture", "AWS", "Microservices", "6+ years"],
|
||||
postedAt: "2025-09-22",
|
||||
},
|
||||
{
|
||||
id: "25",
|
||||
title: "Customer Success Manager",
|
||||
company: "ClientCare",
|
||||
location: "Remote",
|
||||
type: "remote",
|
||||
salary: "R$ 8,000 - R$ 13,000",
|
||||
description: "Ensure customer satisfaction and retention.",
|
||||
requirements: ["Customer success", "SaaS", "Communication", "2+ years"],
|
||||
postedAt: "2025-09-21",
|
||||
},
|
||||
{
|
||||
id: "26",
|
||||
title: "IT Support Specialist",
|
||||
company: "HelpDesk Pro",
|
||||
location: "Curitiba, PR",
|
||||
type: "full-time",
|
||||
salary: "R$ 4,500 - R$ 7,000",
|
||||
description: "Provide technical support to users.",
|
||||
requirements: ["IT support", "Windows", "Troubleshooting", "1+ year"],
|
||||
postedAt: "2025-09-20",
|
||||
},
|
||||
{
|
||||
id: "27",
|
||||
title: "Java Developer",
|
||||
company: "Enterprise Systems",
|
||||
location: "Porto Alegre, RS",
|
||||
type: "full-time",
|
||||
salary: "R$ 10,000 - R$ 15,000",
|
||||
description: "Develop enterprise Java applications.",
|
||||
requirements: ["Java", "Spring Boot", "Maven", "4+ years"],
|
||||
postedAt: "2025-09-19",
|
||||
},
|
||||
{
|
||||
id: "28",
|
||||
title: "Digital Marketing Manager",
|
||||
company: "MediaHub",
|
||||
location: "São Paulo, SP",
|
||||
type: "full-time",
|
||||
salary: "R$ 9,000 - R$ 14,000",
|
||||
description: "Lead digital marketing campaigns.",
|
||||
requirements: ["Digital marketing", "Google Ads", "Social media", "3+ years"],
|
||||
postedAt: "2025-09-18",
|
||||
},
|
||||
{
|
||||
id: "29",
|
||||
title: "iOS Developer",
|
||||
company: "MobileApps",
|
||||
location: "Remote",
|
||||
type: "remote",
|
||||
salary: "R$ 11,000 - R$ 16,000",
|
||||
description: "Build native iOS applications.",
|
||||
requirements: ["Swift", "iOS SDK", "Xcode", "3+ years"],
|
||||
postedAt: "2025-09-17",
|
||||
},
|
||||
{
|
||||
id: "30",
|
||||
title: "Android Developer",
|
||||
company: "MobileApps",
|
||||
location: "Remote",
|
||||
type: "remote",
|
||||
salary: "R$ 11,000 - R$ 16,000",
|
||||
description: "Build native Android applications.",
|
||||
requirements: ["Kotlin", "Android SDK", "3+ years"],
|
||||
postedAt: "2025-09-16",
|
||||
},
|
||||
{
|
||||
id: "31",
|
||||
title: "Project Manager",
|
||||
company: "ProjectWorks",
|
||||
location: "São Paulo, SP",
|
||||
type: "full-time",
|
||||
salary: "R$ 12,000 - R$ 18,000",
|
||||
description: "Lead and deliver successful projects.",
|
||||
requirements: ["PMP", "Project management", "Agile", "5+ years"],
|
||||
postedAt: "2025-09-15",
|
||||
},
|
||||
{
|
||||
id: "32",
|
||||
title: "Full Stack Engineer",
|
||||
company: "WebDev Pro",
|
||||
location: "Rio de Janeiro, RJ",
|
||||
type: "remote",
|
||||
salary: "R$ 13,000 - R$ 19,000",
|
||||
description: "Develop modern web applications end-to-end.",
|
||||
requirements: ["React", "Node.js", "MongoDB", "4+ years"],
|
||||
postedAt: "2025-09-14",
|
||||
},
|
||||
];
|
||||
|
||||
export const mockApplications: Application[] = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue