-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e3c2fd
commit bd8cb48
Showing
14 changed files
with
32,063 additions
and
16,142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { headers } from 'next/headers'; | ||
import { NavBar } from '../../components/NavBar'; | ||
|
||
type Props = { | ||
children: React.ReactNode; | ||
mobile: React.ReactNode; | ||
desktop: React.ReactNode; | ||
// admin: React.ReactNode; | ||
}; | ||
|
||
export default function PublicLayout({ children, mobile, desktop }: Props) { | ||
const headersList = headers(); | ||
const deviceHeader = headersList.get('x-device'); | ||
|
||
// fetch customer name, customerRecord ect. | ||
|
||
return ( | ||
<> | ||
<div className="mx-auto bg-slate-900 py-2"> | ||
<div className="container mx-auto text-white py-2"> | ||
<NavBar /> | ||
</div> | ||
</div> | ||
<div className="mx-auto py-2 mt-2"> | ||
<div className="container mx-auto py-4">{children}</div> | ||
</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Header } from '@jobboard/common-ui'; | ||
import db from '@jobboard/prisma-client'; | ||
|
||
export default async function IndexPage() { | ||
return ( | ||
<div id="welcome"> | ||
<Header> | ||
<span> Hello there, </span> | ||
Welcome jobboard 👋 | ||
</Header> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { NavLink } from '../NavLink/NavLink'; | ||
|
||
export const NavBar = () => { | ||
return ( | ||
<nav> | ||
<ul className="flex"> | ||
<li className="mr-4"> | ||
<NavLink href="/">Home</NavLink> | ||
</li> | ||
<li className="mr-4"> | ||
<NavLink href="/job-offers">Job offers</NavLink> | ||
</li> | ||
<li className="mr-4"> | ||
<NavLink href="/about">About</NavLink> | ||
</li> | ||
<li className="mr-4"> | ||
<NavLink href="/contact">Contact</NavLink> | ||
</li> | ||
</ul> | ||
</nav> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { NavBar } from "./NavBar"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { NavLink } from "./NavLink"; | ||
|
||
const meta = { | ||
title: "UI/Atoms/NavLink", | ||
component: NavLink, | ||
tags: ["autodocs"], | ||
} satisfies Meta<typeof NavLink>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
href: "#", | ||
children: "Click me", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use client'; | ||
|
||
import Link, { type LinkProps } from 'next/link'; | ||
import { usePathname } from 'next/navigation'; | ||
|
||
import { classMerge } from '@jobboard/common-ui'; | ||
|
||
type Props = LinkProps & { children: string }; // LinkProps | ||
|
||
export const NavLink = ({ href, children, ...props }: Props) => { | ||
const currentPath = usePathname(); | ||
const isActive = currentPath.includes(href.toString()); | ||
return ( | ||
<Link | ||
href={href} | ||
className={classMerge('hover:text-blue-400', { | ||
'text-red-500': isActive, | ||
'text-blue-400': !isActive, | ||
})} | ||
{...props} | ||
> | ||
{children} | ||
</Link> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { NavLink } from "./NavLink"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export * from './lib/db'; | ||
import prisma from './lib/db'; | ||
|
||
export default prisma; |
10 changes: 10 additions & 0 deletions
10
libs/prisma-schema/prisma/migrations/20240201154058_rename_company_field/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `employer` on the `JobOffer` table. All the data in the column will be lost. | ||
- Added the required column `company` to the `JobOffer` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "JobOffer" DROP COLUMN "employer", | ||
ADD COLUMN "company" TEXT NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.