Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v1.2.2 to production #250

Merged
merged 87 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
5edffd5
build(deps): bump eslint from 8.49.0 to 8.50.0 (#122)
dependabot[bot] Sep 26, 2023
c86a935
build(deps): bump @types/node from 20.6.0 to 20.7.1 (#125)
dependabot[bot] Sep 29, 2023
de89e0c
build(deps): bump sanity from 3.16.1 to 3.17.0 (#129)
dependabot[bot] Oct 4, 2023
93bb5c6
build(deps): bump @types/node from 20.7.1 to 20.8.2 (#128)
dependabot[bot] Oct 4, 2023
9b4cde6
build(deps): bump zod and next (#131)
dependabot[bot] Oct 4, 2023
6242ddd
build(deps): bump postcss from 8.4.25 to 8.4.31 (#130)
dependabot[bot] Oct 4, 2023
83e337e
chore: move all enums in its own folder (#126)
Mosazghi Oct 5, 2023
d1dd021
refacotr: Adds .prettierc config file for default formatting (#133)
Mosazghi Oct 8, 2023
a0414f6
Add route for bedrifter (#134)
AbdiYus Oct 9, 2023
aa73c15
Change route name to norwegian (#138)
AbdiYus Oct 9, 2023
d990a8a
build(deps): bump eslint from 8.50.0 to 8.51.0 (#137)
dependabot[bot] Oct 9, 2023
24a092c
Better descriptions for the input fields (#135)
Nahom101-1 Oct 11, 2023
a7d223b
build(deps): bump sanity from 3.17.0 to 3.18.0 (#145)
dependabot[bot] Oct 12, 2023
98de4f3
build(deps): bump @sanity/client from 6.4.12 to 6.6.0 (#146)
dependabot[bot] Oct 12, 2023
fc9d2da
Merge branch 'main' into development
KjetilIN Oct 13, 2023
9f6a6e4
add: section for contributors in readme (#150)
KjetilIN Oct 13, 2023
b627769
add: contributers file and config (#151)
KjetilIN Oct 13, 2023
6d0e5b8
docs: add KjetilIN as a contributor for code (#152)
allcontributors[bot] Oct 13, 2023
1652a5b
docs: add members as a contributor for code (#153)
allcontributors[bot] Oct 13, 2023
43a8b42
docs: add AbdiYus as a contributor for code (#154)
allcontributors[bot] Oct 13, 2023
58971ee
contibutor-patch
KjetilIN Oct 13, 2023
6f61773
docs: add Hannah-Sofie as a contributor for code (#155)
allcontributors[bot] Oct 13, 2023
b52d75f
docs: add Mosazghi as a contributor for code (#157)
allcontributors[bot] Oct 13, 2023
a7b757f
docs: add FredrikSundt-Hansen as a contributor for code (#156)
allcontributors[bot] Oct 13, 2023
727b41a
Update .all-contributorsrc
KjetilIN Oct 14, 2023
c0a7830
docs: add AbdiYus as a contributor for bug (#160)
allcontributors[bot] Oct 14, 2023
9399b40
docs: add KjetilIN as a contributor for bug (#162)
allcontributors[bot] Oct 14, 2023
063d5db
route name change (#158)
AbdiYus Oct 14, 2023
6f7173b
feat: new baerekraft page (#163)
Mosazghi Oct 14, 2023
fc3db9c
docs: add Mosazghi as a contributor for bug (#165)
allcontributors[bot] Oct 14, 2023
bb2cd80
fix: new properties for .prettierrc file (#164)
Mosazghi Oct 14, 2023
3a2d53b
add: emoji explanation (#171)
KjetilIN Oct 18, 2023
1317b8e
update: english text for contribute file (#170)
KjetilIN Oct 18, 2023
aa0eff9
docs: add KjetilIN as a contributor for projectManagement (#172)
allcontributors[bot] Oct 18, 2023
2de7083
build(deps): bump @babel/traverse from 7.22.10 to 7.23.2 (#173)
dependabot[bot] Oct 19, 2023
cce98bf
made an over badge for the events (#141)
Hannah-Sofie Oct 19, 2023
a187a2b
docs: add KjetilIN as a contributor for design (#174)
allcontributors[bot] Oct 19, 2023
df1c339
docs: add Hannah-Sofie as a contributor for design (#175)
allcontributors[bot] Oct 19, 2023
e7b6bab
docs: add Mosazghi as a contributor for design (#176)
allcontributors[bot] Oct 19, 2023
bca94ba
Update CONTRIBUTORS.md (#178)
KjetilIN Oct 19, 2023
cda3cf4
docs: add AbdiYus as a contributor for design (#177)
allcontributors[bot] Oct 19, 2023
7e3fa0f
revesed order of elements in events fetch (#186)
AbdiYus Oct 25, 2023
8c5f8af
add: main text (#183)
Mosazghi Oct 25, 2023
a00d52c
build(deps): bump actions/setup-node from 3 to 4 (#184)
dependabot[bot] Oct 25, 2023
e76c845
build(deps): bump eslint from 8.51.0 to 8.52.0 (#182)
dependabot[bot] Oct 25, 2023
d48c941
build(deps): bump @sanity/client from 6.6.0 to 6.7.0 (#179)
dependabot[bot] Oct 25, 2023
ac8dc64
add: new route => "om-oss" (#168)
Nahom101-1 Oct 25, 2023
3797f0a
fix: event date format (#191)
Mosazghi Oct 27, 2023
f8db1a7
fix(urgent?): aligns eventcards section properly (#166)
Mosazghi Oct 28, 2023
9842943
Merge branch 'main' into development
KjetilIN Oct 29, 2023
d88ed98
del: remove uppercase route
KjetilIN Oct 29, 2023
8b70678
build(deps): bump eslint-config-next from 13.5.1 to 14.0.1 (#197)
dependabot[bot] Nov 1, 2023
b28f10f
del: submodule (#199)
KjetilIN Nov 1, 2023
e330dc9
docs: add Nahom101-1 as a contributor for code (#200)
allcontributors[bot] Nov 1, 2023
b446575
build(deps): bump sanity from 3.18.0 to 3.19.0 (#201)
dependabot[bot] Nov 1, 2023
918b3b3
fix: event card width (#202)
Mosazghi Nov 3, 2023
13a5ea6
Merge branch 'main' into development
KjetilIN Nov 3, 2023
014ee23
Fix eventcard width (#205)
Mosazghi Nov 6, 2023
d6bf3b7
build(deps): bump eslint from 8.52.0 to 8.53.0 (#213)
dependabot[bot] Nov 6, 2023
e1036df
Eventpage (#212)
Hannah-Sofie Nov 6, 2023
ee2cef3
add: sustainability images and description (#210)
Mosazghi Nov 6, 2023
1a0d99b
For bedrifter text layout (#216)
AbdiYus Nov 8, 2023
929d24c
Carbon footprint header+text (#214)
Mosazghi Nov 8, 2023
ff91c73
sustainability bold and url badge (#219)
Mosazghi Nov 9, 2023
985575b
build(deps): bump @types/node from 20.8.6 to 20.9.0 (#220)
dependabot[bot] Nov 9, 2023
e274c90
build(deps): bump @sanity/client from 6.7.0 to 6.8.0 (#222)
dependabot[bot] Nov 12, 2023
8628c33
del: deleted submodule
KjetilIN Nov 12, 2023
690b748
Events (#223)
Hannah-Sofie Nov 15, 2023
ffac41f
Gallery (#226)
Hannah-Sofie Nov 15, 2023
ba57717
Front page nav bar (#187)
FredrikSundt-Hansen Nov 15, 2023
496a051
Nav bar animation (#229)
FredrikSundt-Hansen Nov 15, 2023
2361f9a
add navbar to all pages (#230)
FredrikSundt-Hansen Nov 15, 2023
46b886e
Previous events (#224)
Hannah-Sofie Nov 16, 2023
b76a63b
Mazemap component (#207)
AbdiYus Nov 17, 2023
7440c25
build(deps): bump sanity from 3.19.0 to 3.20.0 (#232)
dependabot[bot] Nov 17, 2023
d9141cb
build(deps): bump eslint from 8.53.0 to 8.54.0 (#234)
dependabot[bot] Nov 20, 2023
38c678e
Front page animation (#235)
FredrikSundt-Hansen Nov 21, 2023
34637f2
build(deps): bump typescript from 5.2.2 to 5.3.2 (#236)
dependabot[bot] Nov 21, 2023
d366a82
Sustainability page text (#237)
Mosazghi Nov 22, 2023
bf4894a
For bedrifter mvp (#243)
AbdiYus Nov 26, 2023
4fad46c
build(deps): bump @types/node from 20.9.0 to 20.10.0 (#239)
dependabot[bot] Nov 27, 2023
e7b3962
build(deps): bump @sanity/client from 6.8.6 to 6.9.1 (#244)
dependabot[bot] Nov 30, 2023
fce46f0
build(deps): bump eslint from 8.54.0 to 8.55.0 (#245)
dependabot[bot] Dec 10, 2023
4f557a4
build(deps): bump sanity from 3.20.0 to 3.21.1 (#249)
dependabot[bot] Dec 10, 2023
fad127b
build(deps-dev): bump eslint-config-prettier from 9.0.0 to 9.1.0 (#246)
dependabot[bot] Dec 11, 2023
c9f1a2e
build(deps): bump vite from 4.4.9 to 4.5.1 (#247)
dependabot[bot] Dec 12, 2023
1b6499d
Merge branch 'main' into development
KjetilIN Dec 12, 2023
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
8 changes: 8 additions & 0 deletions app/(site)/alle-arrangementer/andre-arrangementer/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const OtherEventsPage = () => {
return <EventPage eventId='8' />;
};

export default OtherEventsPage;

8 changes: 8 additions & 0 deletions app/(site)/alle-arrangementer/baerekraftsforedrag/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const SustainabilityTalkEventPage = () => {
return <EventPage eventId='3' />;
};

export default SustainabilityTalkEventPage;

8 changes: 8 additions & 0 deletions app/(site)/alle-arrangementer/bcm/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const BcmEventPage = () => {
return <EventPage eventId='1' />;
};

export default BcmEventPage;

8 changes: 8 additions & 0 deletions app/(site)/alle-arrangementer/blender/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const BlenderEventPage = () => {
return <EventPage eventId='2' />;
};

export default BlenderEventPage;

8 changes: 8 additions & 0 deletions app/(site)/alle-arrangementer/casebreaker/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const CasebreakerEventPage = () => {
return <EventPage eventId='4' />;
};

export default CasebreakerEventPage;

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const StartABusinessEventPage = () => {
return <EventPage eventId='5' />;
};

export default StartABusinessEventPage;

8 changes: 8 additions & 0 deletions app/(site)/alle-arrangementer/idekonkurranse/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import EventPage from '@/components/events/eventPage';

const IdeaCompetitionEventPage = () => {
return <EventPage eventId='6' />;
};

export default IdeaCompetitionEventPage;

7 changes: 7 additions & 0 deletions app/(site)/alle-arrangementer/mot-en-grunder/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import EventPage from '@/components/events/eventPage';

const MeetAFounderEventPage = () => {
return <EventPage eventId='7' />;
};

export default MeetAFounderEventPage;
70 changes: 70 additions & 0 deletions app/(site)/alle-arrangementer/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
'use client';

import React, { useEffect, useState } from 'react';
import BackButton from '@/components/UI/backbutton';
import Footer from '@/components/footer/footer';
import EventBox from '@/components/events/eventBox';
import SectionTitle from '@/components/events/sectionTitle';
import PastEventBox from '@/components/events/pastEventBox';
import { events } from '@/components/events/eventData';
import { getPastEventCards } from '@/backend/sanity-utils';
import { EventCardType } from '@/types/EventCardType';

export default function AllEventsPage() {
const [pastEvents, setPastEvents] = useState<EventCardType[]>([]);
const [error, setError] = useState<string | null>(null); // Error state

useEffect(() => {
getPastEventCards()
.then((data) => {
setPastEvents(data);
setError(null); // Clear any previous error
})
.catch((error) => {
console.error('Error fetching past events:', error);
setError('Failed to load past events. Please try again later.');
});
}, []);

return (
<main className='bg-gradient-to-r from-gray-800 via-gray-900 to-black min-h-screen flex flex-col items-center justify-start'>
<header>
<SectionTitle title='Våre arrangementer' />
</header>

<section className='grid md:grid-cols-3 gap-8 my-8 w-full max-w-5xl'>
{events.map((event) => (
<EventBox key={event.id} {...event} />
))}
</section>

<section>
<SectionTitle title='Tidligere arrangementer' />
{/* Change to a single-column grid layout */}
<div className='grid grid-cols-1 gap-8 my-8 w-full max-w-5xl'>
{pastEvents.length > 0 ? (
pastEvents.map((event) => (
<PastEventBox
key={event._id}
id={event._id}
title={event.title}
alt={`Image for ${event.title}`}
link={`/arrangementer/${event.slug}`}
/>
))
) : (
<p className='mt-2 text-center'>Ingen tidligere arrangementer.</p>
)}
</div>
</section>

<div className='fixed top-0 right-0 m-4'>
<BackButton link='/' text='Tilbake til hovedsiden' />
</div>

<footer className='w-full'>
<Footer />
</footer>
</main>
);
}
123 changes: 58 additions & 65 deletions app/(site)/arrangementer/[eventPage]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,86 +1,79 @@
"use client"; // Use client to render the page
'use client'; // Use client to render the page

import { getEventPage } from "@/backend/sanity-utils";
import BackButton from "@/components/UI/backbutton";
import RegistrerButton from "@/components/UI/registrerbutton";
import Footer from "@/components/footer/footer";
import LoadingPage from "@/components/loadingPage/loadingPage";
import { EventPageType } from "@/types/EventPageType";
import getDateTimeFormat from "@/utils/date";
import { PortableText } from "@portabletext/react";
import { error } from "console";
import { redirect, useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { getCurrentEventCards } from '@/backend/sanity-utils';
import BackButton from '@/components/UI/backbutton';
import RegistrerButton from '@/components/UI/registrerbutton';
import Footer from '@/components/footer/footer';
import LoadingPage from '@/components/loadingPage/loadingPage';
import { EventPageType } from '@/types/EventPageType';
import getDateTimeFormat from '@/utils/date';
import { PortableText } from '@portabletext/react';
import { error } from 'console';
import { redirect, useRouter } from 'next/navigation';
import { useEffect, useState } from 'react';

// Props for the event page
type Props = {
params: { eventPage: string };
params: { eventPage: string };
};

export default function PageForEvent({ params }: Props) {
const [eventPage, setEventPage] = useState<EventPageType | null>(null);
const [eventPage, setEventPage] = useState<EventPageType | null>(null);

const slug = params.eventPage;
const router = useRouter();
const slug = params.eventPage;
const router = useRouter();

useEffect(() => {
if (!slug) router.push('/');
if (!eventPage) {
getCurrentEventCards(slug)
.then((data) => {
if (!data) {
router.push('/feilside');
}
setEventPage(data);
})
.catch((error) => console.log('Error catches!', error));
}
}, [slug, eventPage, router]);

useEffect(() => {
if (!slug) router.push("/");
if (!eventPage) {
getEventPage(slug)
.then((data) => {
if (!data) {
router.push("/feilside");
}
setEventPage(data);
})
.catch((error) => console.log("Error catches!", error));
return <LoadingPage />;
}
}, [slug, eventPage, router]);

if (!eventPage) {
return <LoadingPage />;
}

// Information time and date formatted correctly
let { dateFormat, timeFormat } = getDateTimeFormat(eventPage.datetime);
let isOver: Boolean = new Date() > new Date(eventPage.datetime);
// Information time and date formatted correctly
let { dateFormat, timeFormat } = getDateTimeFormat(eventPage.datetime);
let isOver: Boolean = new Date() > new Date(eventPage.datetime);

const EventOverBadge = () => {
return isOver ? (
<span className="bg-red-100 text-red-800 text-sm font-medium mr-2 px-2.5 py-1.5 rounded ">
Påmelding Lukket!
</span>
) : null;
};
const EventOverBadge = () => {
return isOver ? <span className='bg-red-100 text-red-800 text-sm font-medium mr-2 px-2.5 py-1.5 rounded '>Påmelding Lukket!</span> : null;
};

return (
<div className="flex flex-col min-h-screen bg-gradient-to-tl from-gradient-end via-gradient-mid to-gradient-start">
<main className="text-4xl flex justify-center min-h-screen">
<div className="bg-slate-100 h-fit w-11/12 mt-2 p-5 md:p-20 md:w-3/4 md:text-6xl">
<h1 className=" font-bold text-black">{eventPage.title}</h1>
return (
<div className='flex flex-col min-h-screen bg-gradient-to-tl from-gradient-end via-gradient-mid to-gradient-start'>
<main className='text-4xl flex justify-center min-h-screen'>
<div className='bg-slate-100 h-fit w-11/12 mt-2 p-5 md:p-20 md:w-3/4 md:text-6xl'>
<h1 className=' font-bold text-black'>{eventPage.title}</h1>

<h2 className="text-black text-xl my-2 md:text-2xl md:my-5">
{" "}
📅 {dateFormat} | 🕕 {timeFormat} <EventOverBadge />{" "}
</h2>
<h2 className='text-black text-xl my-2 md:text-2xl md:my-5'>
{' '}
📅 {dateFormat} | 🕕 {timeFormat} <EventOverBadge />{' '}
</h2>

<hr className="h-1 my-8 border-0 bg-gray-800" />
<hr className='h-1 my-8 border-0 bg-gray-800' />

<div className="text-lg text-gray-800 mt-5 mx-10">
<PortableText value={eventPage.content} />
</div>
<div className='text-lg text-gray-800 mt-5 mx-10'>
<PortableText value={eventPage.content} />
</div>

<div className="flex justify-left gap-2">
<RegistrerButton
isEventOverBoolean={isOver ? true : false}
urlToForm={eventPage.url}
/>
<div className='flex justify-left gap-2'>
<RegistrerButton isEventOverBoolean={isOver ? true : false} urlToForm={eventPage.url} />

<BackButton link="/" text="Tilbake" />
</div>
<BackButton link='/' text='Tilbake' />
</div>
</div>
</main>
<Footer />
</div>
</main>
<Footer />
</div>
);
);
}
11 changes: 8 additions & 3 deletions app/(site)/baerekraft/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import Footer from '@/components/footer/footer';
import SustainabilityMain from '@/components/jumbotron/sustainabilityMain';
import Header from '@/components/header/page';
import CarbonFootprint from '@/components/sustainability/carbonFootprint/carbonFootprint';
import SustainabilityMain from '@/components/sustainability/sustainabilityMain';

export default function BaerekraftPage() {
return (
<div className='flex flex-col min-h-screen bg-gradient-to-tl from-gradient-end via-gradient-mid to-gradient-start'>
<main className='flex justify-center min-h-screen'>
<div className='bg-gray-900'>
<Header />
<main className='mx-auto my-0 max-w-5xl px-4 transition-all md:px-8 min-h-screen'>
<SustainabilityMain />
<CarbonFootprint />
</main>
<Footer />
</div>
Expand Down
60 changes: 25 additions & 35 deletions app/(site)/bli-medlem/page.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,43 @@
import JoinList from "@/components/JoinList/joinlist";
import BackButton from "@/components/UI/backbutton";
import ChecklistItem from "@/components/UI/checklistitem";
import Footer from "@/components/footer/footer";
import React from 'react';
import JoinList from '@/components/JoinList/joinlist';
import BackButton from '@/components/UI/backbutton';
import ChecklistItem from '@/components/UI/checklistitem';
import Footer from '@/components/footer/footer';
import Header from '@/components/header/page';

export default function JoinPage() {


return (
<main className="bg-gray-900 min-h-screen">

<div className="flex justify-center pt-10 px-6">
<h1 className="text-4xl md:text-6xl">Bli medlem🚀</h1>
<main className='bg-gray-900 min-h-screen'>
<div className='flex justify-center pt-10 px-6'>
<h1 className='text-4xl md:text-6xl'>Bli medlem🚀</h1>
</div>


<div className="flex flex-col items-center mt-10 gap-10">

<section className="px-1">
<h2 className="mb-2 text-lg font-semibold text-white">Hvem burde søke? 🤔</h2>
<ul className="max-w-md space-y-1 list-inside text-gray-400">
<ChecklistItem text="Du er engasjert!" />
<ChecklistItem text="Du liker å ta ansvar!"/>
<ChecklistItem text="Du brenner for innovasjon og entreprenørskap!" />
<ChecklistItem text="Du studerer på NTNU eller Fagskolen i Gjøvik" />
<div className='flex flex-col items-center mt-10 gap-10'>
<section className='px-1'>
<h2 className='mb-2 text-lg font-semibold text-white'>Hvem burde søke? 🤔</h2>
<ul className='max-w-md space-y-1 list-inside text-gray-400'>
<ChecklistItem text='Du er engasjert!' />
<ChecklistItem text='Du liker å ta ansvar!' />
<ChecklistItem text='Du brenner for innovasjon og entreprenørskap!' />
<ChecklistItem text='Du studerer på NTNU eller Fagskolen i Gjøvik' />
</ul>
</section>

<section className="px-1">
<h2 className="mb-2 text-lg font-semibold text-white">Fordeler ✨</h2>
<ul className="max-w-md space-y-1 list-inside text-gray-400">
<section className='px-1'>
<h2 className='mb-2 text-lg font-semibold text-white'>Fordeler ✨</h2>
<ul className='max-w-md space-y-1 list-inside text-gray-400'>
<ChecklistItem text="Styrk CV'en din 📝" />
<ChecklistItem text="Delta på intern teambuilding!" />
<ChecklistItem text="Bygg et solid nettverk" />
<ChecklistItem text='Delta på intern teambuilding!' />
<ChecklistItem text='Bygg et solid nettverk' />
</ul>
</section>



<JoinList />

<BackButton link="/" text="Tilbake til hovedsiden"/>
<BackButton link='/' text='Tilbake til hovedsiden' />
</div>

<Footer/>





<Footer />
</main>
);
}
}
Loading