Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions app/rent/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
"use client";
import LinkButton from "@/components/linkButton";
import { Button } from "@/components/ui/button";
import React, { useState } from "react";

interface Ad {
title: string;
description: string;
location: string;
contact: string;
}

export default function RentMePage() {
const [ads, setAds] = useState<Ad[]>([
{
title: "Turkamerat",
description:
"Bli med på tur i skog og mark. Jeg har godt humør og mye energi.",
location: "Oslo",
contact: "OleBrumm@example.com",
},
{
title: "Eventplanlegger",
description:
"Kreativ og strukturert, hjelper deg med å planlegge ditt neste arrangement.",
location: "Bergen",
contact: "johanne@herheim.com",
},
{
title: "Fotograf",
description:
"Erfaren fotograf tilgjengelig for portretter og arrangementer.",
location: "Stavanger",
contact: "Karo@gil.com",
},
{
title: "Musiker",
description:
"Talentfull gitarist som kan spille på små og store arrangementer.",
location: "Trondheim",
contact: "Henrik@lomo.com",
},
{
title: "Hundepasser",
description: "Elsker hunder, passer både store og små hunder.",
location: "Oslo",
contact: "Mille@hoeg.com",
},
]);

const addAd = () => {
const newAd = {
title: "Hjelp med flytting",
description: "Sterk og arbeidsvillig, kan hjelpe med flytting og bæring.",
location: "Bergen",
contact: "flyttehjelp@kompis.com",
};
setAds([...ads, newAd]);
};

return (
<div className="min-h-screen bg-background text-background">
<main className="max-w-4xl mx-auto px-6 py-12">
<section>
<h2 className="text-foreground text-2xl font-semibold mb-6">
Lei en kompis
</h2>
{ads.map((ad, index) => (
<div
key={index}
className="bg-foreground rounded-xl shadow-md p-6 mb-6 hover:shadow-lg transition-shadow"
>
<h3 className="text-xl font-bold">{ad.title}</h3>
<p className="text-sm text-gray-500">{ad.location}</p>
<p className="mt-2">{ad.description}</p>
<p className="mt-2 text-sm">Kontakt: {ad.contact}</p>
<LinkButton
text="Kontakt"
url={`mailto:${ad.contact}`}
className="mt-4 inline-block px-4 py-2 border border-background rounded-md text-background hover:bg-background hover:text-foreground transition w-fit"
/>
</div>
))}
<Button
onClick={addAd}
className="mt-4 px-4 py-2 bg-primary rounded-md"
>
Legg ut annonse
</Button>
</section>
</main>
</div>
);
}
5 changes: 4 additions & 1 deletion components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ export function Footer() {
<footer className="flex flex-col bottom-0 w-full bg-foreground text-background p-12 border-t">
<div className="flex flex-row items-center justify-center w-full">
<p className="uppercase text-lg font-bold">...KOMPIS</p>
<div className="ml-auto flex justify-center gap-4">
<div className="ml-auto flex justify-center gap-5">
<Link href="/aboutUs" className="ml-auto flex justify-center">
Om oss
</Link>
<Link href="/careers" className="ml-auto flex justify-center">
Jobb
</Link>
<Link href="/rent" className="ml-auto flex justify-center">
Leie
</Link>
</div>
</div>
<div className="flex flex-col items-center justify-center w-full">
Expand Down