Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
RishikeshNK committed Mar 31, 2024
2 parents 9c6544b + 55a7d93 commit 1524f7d
Show file tree
Hide file tree
Showing 27 changed files with 506 additions and 102 deletions.
Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/fonts/AltivoMedium.otf
Binary file not shown.
Binary file added public/fonts/AltivoRegular.otf
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions public/svg/hidingLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 0 additions & 27 deletions public/svg/logo.svg

This file was deleted.

8 changes: 3 additions & 5 deletions src/app/companies/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import Header from "~/components/header";
import HeaderLayout from "~/components/header-layout";
import SearchFilter from "~/components/search-filter";

export default async function Companies() {
return (
<div className="flex h-full flex-col">
<Header />

<div className="mx-12 mt-16 flex flex-col">
<HeaderLayout>
<SearchFilter />
</div>
</HeaderLayout>
</div>
);
}
43 changes: 7 additions & 36 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,7 @@ import "~/styles/globals.css";
import { TRPCReactProvider } from "~/trpc/react";
import { Toaster } from "~/components/ui/sonner";
import { cn } from "~/lib/utils";

import localFont from "next/font/local";

// Font files can be colocated inside of `pages`
const myFont = localFont({
src: [
{
path: "./../app/fonts/BentonSansBook.otf",
weight: "200",
style: "normal",
},
{
path: "./../app/fonts/BentonSansRegular.otf",
weight: "400",
style: "normal",
},
{
path: "./../app/fonts/BentonSansMedium.otf",
weight: "600",
style: "normal",
},
{
path: "./../app/fonts/BentonSansBold.otf",
weight: "800",
style: "normal",
},
],
variable: "--font-sans",
});
import { bentonSansFont } from "~/styles/font";

export const metadata = {
title: "Cooper",
Expand All @@ -44,13 +16,12 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={cn(
"min-h-screen bg-background font-sans antialiased",
myFont.variable,
)}
>
<html
className={bentonSansFont.variable}
lang="en"
suppressHydrationWarning
>
<body className={cn("min-h-screen bg-white font-sans antialiased")}>
<TRPCReactProvider>{children}</TRPCReactProvider>
<Toaster />
</body>
Expand Down
17 changes: 9 additions & 8 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import Header from "~/components/header";
import HeaderLayout from "~/components/header-layout";
import SearchFilter from "~/components/search-filter";

export default async function Home() {
return (
<div className="flex h-[85vh] flex-col">
<Header />
<div className="flex h-full flex-col items-center justify-center">
<p className="mb-8 text-2xl font-semibold">
Search your dream co-op role!
</p>
<SearchFilter />
</div>
<HeaderLayout>
<div className="flex h-full flex-col items-center justify-center">
<p className="mb-8 text-2xl font-semibold">
Search your dream co-op role!
</p>
<SearchFilter />
</div>
</HeaderLayout>
</div>
);
}
30 changes: 30 additions & 0 deletions src/app/roles/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import HeaderLayout from "~/components/header-layout";
import { RoleReviewCard } from "~/components/role-review-card";
import SearchFilter from "~/components/search-filter";
import { api } from "~/trpc/server";
import { unstable_noStore as noStore } from "next/cache";

export default async function Roles() {
/**
* FIXME: This is a temporary fix, figure out how to get build command working without noStore();
* @returns A promise containing the roles from the database
*/
async function getRoles() {
noStore();
const roles = await api.role.list.query();
return roles;
}

const roles = await getRoles();

return (
<HeaderLayout>
<SearchFilter />
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3">
{roles.map((role) => {
return <RoleReviewCard key={role.id} roleObj={role} />;
})}
</div>
</HeaderLayout>
);
}
18 changes: 18 additions & 0 deletions src/components/header-layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { ReactNode } from "react";
import Header from "~/components/header";

/**
* This should be used when placing content under the header, standardizes how children are placed under a header.
* @param param0 Children to pass into the layout
* @returns A layout component that standardizes the distance from the header
*/
export default function HeaderLayout({ children }: { children: ReactNode }) {
return (
<div className="flex min-h-screen flex-col">
<Header />
<article className="mt-16 flex flex-col items-center justify-center">
{children}
</article>
</div>
);
}
Loading

0 comments on commit 1524f7d

Please sign in to comment.