typescript fixes
This commit is contained in:
@@ -128,7 +128,17 @@ export default async function DashboardPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<CardTitle className="text-xl font-semibold text-gray-800">{company.name}</CardTitle>
|
<CardTitle className="text-xl font-semibold text-gray-800">{company.name}</CardTitle>
|
||||||
<p className="text-sm text-gray-500 mt-1">{company.email}</p>
|
{company.link && (
|
||||||
|
<a
|
||||||
|
href={company.link}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="text-sm text-blue-600 hover:text-blue-700 mt-1 inline-flex items-center gap-1"
|
||||||
|
>
|
||||||
|
Visit Website
|
||||||
|
<ExternalLink className="w-3 h-3" />
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { join } from 'path';
|
|||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: { filename: string } }
|
{ params }: { params: Promise<{ filename: string }> }
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const filename = params.filename;
|
const { filename } = await params;
|
||||||
|
|
||||||
// Security check - prevent directory traversal
|
// Security check - prevent directory traversal
|
||||||
if (filename.includes('..') || filename.includes('/') || filename.includes('\\')) {
|
if (filename.includes('..') || filename.includes('/') || filename.includes('\\')) {
|
||||||
|
|||||||
@@ -171,7 +171,13 @@ export default async function DashboardPage() {
|
|||||||
<div className="flex items-start justify-between mb-4">
|
<div className="flex items-start justify-between mb-4">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-xl font-bold text-gray-900 mb-2">{company.name}</h3>
|
<h3 className="text-xl font-bold text-gray-900 mb-2">{company.name}</h3>
|
||||||
<p className="text-gray-600 text-sm">{company.email}</p>
|
{company.link && company.link !== "N/A" && (
|
||||||
|
<p className="text-blue-600 text-sm hover:underline">
|
||||||
|
<a href={company.link} target="_blank" rel="noopener noreferrer">
|
||||||
|
Visit Website
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Badge variant="secondary" className="bg-blue-100 text-blue-700">
|
<Badge variant="secondary" className="bg-blue-100 text-blue-700">
|
||||||
{company.jobs.length} jobs
|
{company.jobs.length} jobs
|
||||||
@@ -374,7 +380,7 @@ export default async function DashboardPage() {
|
|||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href="/jobs">
|
<Link href="/jobs">
|
||||||
<Button size="lg" variant="outline" className="border-white text-white hover:bg-white/10 px-8 py-3 text-lg hover:text-black text-primary font-semibold">
|
<Button size="lg" variant="outline" className="border-white text-white hover:bg-white/10 hover:text-black px-8 py-3 text-lg font-semibold">
|
||||||
Browse Jobs
|
Browse Jobs
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { headers } from 'next/headers';
|
|||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
{ params }: { params: { filename: string } }
|
{ params }: { params: Promise<{ filename: string }> }
|
||||||
) {
|
) {
|
||||||
console.log("HELLO WORLD")
|
console.log("HELLO WORLD")
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user