Skip to content

Commit

Permalink
lagde eventpage og koblet den opp
Browse files Browse the repository at this point in the history
  • Loading branch information
A1ice-Z committed Nov 22, 2023
1 parent 88aa44c commit 5e13446
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 9 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"postcss": "^8.4.30",
"tailwindcss": "^3.3.3",
"tailwindcss": "^3.3.5",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
Expand Down
1 change: 0 additions & 1 deletion src/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const AboutPage: React.FC = () => {
<div style={{ backgroundColor: '#313131' }} className=" p-4 w-full h-24 rounded-lg mb-4"></div>
<div style={{ backgroundColor: '#313131' }} className=" p-4 w-full h-24 rounded-lg mb-4"></div>
<div style={{ backgroundColor: '#313131' }} className=" p-4 w-full h-24 rounded-lg mb-4"></div>

</div>
</div>
</Page>
Expand Down
23 changes: 23 additions & 0 deletions src/pages/EventPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Page from '../structure/Page';

const EventPage: React.FC = () => {
const numbers = Array.from({ length: 5 }, (_, index) => 1 + index);

Check failure on line 4 in src/pages/EventPage.tsx

View workflow job for this annotation

GitHub Actions / run-eslint

'numbers' is assigned a value but never used

return (
<Page>
<div className='relative px-60'>
<div className="flex flex-row items-center space-x-8'">
<p className="text-text-50 font-black text-4xl">Ny artikkel</p>
<p className="text-text-50 font-black text-4xl">Nytt arrangement</p>
</div>
</div>
<div className='relative px-60'>
<div className="flex flex-col custom-height">
<p className="text-text-50 font-black text-4xl py-4">Arrangementer</p>
</div>
</div>
</Page>
)
}

export default EventPage
5 changes: 5 additions & 0 deletions src/structure/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import Header from './Header'
import Footer from './Footer'
import Home from '../pages/Home'
import AboutPage from '../pages/AboutPage'
import EventPage from '../pages/EventPage'



//mport Logo from '../assets/logo.png'
Expand All @@ -29,6 +31,9 @@ const Content: React.FC<ContentProps> = () => {
<Route path='/AboutPage'>
<Route index element={<AboutPage />} />
</Route>
<Route path='/EventPage'>
<Route index element={<EventPage/>}/>
</Route>
</Routes>
</div>
<Footer />
Expand Down
6 changes: 5 additions & 1 deletion src/structure/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const Header: React.FC<HeaderProps> = () => {
const navigateToAboutPage = () => {
navigate('/AboutPage');
}
const navigateToEventPage = () => {
navigate('EventPage');

}
const navigateToHomePage = () => {
navigate('/');
}
Expand All @@ -41,7 +45,7 @@ const Header: React.FC<HeaderProps> = () => {
</div>
<div className='flex flex-row items-center space-x-4'>
<button onClick={navigateToAboutPage}>Om oss</button>
<p>Arrangementer</p>
<button onClick={navigateToEventPage}>Arrangementer</button>
<button onClick={toggleTheme} className='p-4 h-min rounded-full text-white'>
{
dark ? <FaSun /> : <FaMoon />
Expand Down

0 comments on commit 5e13446

Please sign in to comment.