Skip to content

Commit

Permalink
fix: Minor image errors and navbar attribute naming
Browse files Browse the repository at this point in the history
  • Loading branch information
hampfh committed Mar 10, 2024
1 parent e39b457 commit 404ca90
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/exhibitor/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function ExhibitorLayout({
return (
<>
<NavigationMenu
itemAside={
aside={
<Link href="https://register.armada.nu/register">
<Button>Exhibitor signup</Button>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function HomePage() {
return (
<>
<NavigationMenu
itemAside={
aside={
<Link href="https://register.armada.nu/register">
<Button>Exhibitor Signup</Button>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/app/student/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function ExhibitorLayout({
return (
<>
<NavigationMenu
itemAside={
aside={
data != null && (
<Link href="https://ais.armada.nu/fairs/2024/recruitment">
<Button variant={"outline"}>Apply for Armada</Button>
Expand Down
6 changes: 3 additions & 3 deletions src/components/shared/NavigationMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const studentLinks: { title: string; href: string; description: string }[] = [

export function NavigationMenu(
props: React.HTMLAttributes<HTMLDivElement> & {
itemAside?: React.ReactNode
aside?: React.ReactNode
float?: boolean // Default true
}
) {
Expand Down Expand Up @@ -103,7 +103,7 @@ export function NavigationMenu(
{/** Sheet is used for mobile navigation */}
<Sheet open={sheetOpen}>
<div className="flex w-full justify-between md:hidden">
{props.itemAside}
{props.aside != null && <>{props.aside}</>}
<SheetTrigger
className="md:hidden"
onClick={() => setSheetOpen(true)}>
Expand Down Expand Up @@ -212,7 +212,7 @@ export function NavigationMenu(
</NavigationMenuItem>
</NavigationMenuList>
</BaseNavigationMenu>
<div>{props.itemAside}</div>
{props.aside != null && <div>{props.aside}</div>}
</div>
</div>
)
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/hooks/api/useExhibitors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export async function fetchExhibitors(options?: { year?: number }) {
const res = await fetch(
`${env.NEXT_PUBLIC_API_URL}/api/exhibitors?year=${options?.year ?? defaultYear}`,
{
credentials: "include",
next: {
tags: [
"exhibitors",
Expand Down
4 changes: 1 addition & 3 deletions src/components/shared/hooks/api/useOrganization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ export interface Person {
}

export async function fetchOrganization() {
const res = await fetch(`${env.NEXT_PUBLIC_API_URL}/api/organization/v2`, {
credentials: "include"
})
const res = await fetch(`${env.NEXT_PUBLIC_API_URL}/api/organization/v2`, {})
const result = await res.json()
return result as Organization[]
}
Expand Down

0 comments on commit 404ca90

Please sign in to comment.