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

Clean up directory pages + remove like button #228

Merged
merged 3 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 0 additions & 10 deletions src/app/directory/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import ClubDocuments from '@src/components/ClubDocuments';
import Header from '@src/components/BaseHeader';
import OrgHeader from '@src/components/OrgHeader';
import OrgInfoSegment from '@src/components/OrgInfoSegment';
import OrgUpcomingEvents from '@src/components/OrgUpcomingEvents';
import { api } from '@src/trpc/server';
import { PlusIcon } from '@src/icons/Icons';
import { db } from '@src/server/db';
import { eq } from 'drizzle-orm';
import { type Metadata } from 'next';
Expand All @@ -21,14 +19,6 @@ const OrganizationPage = async ({ params }: { params: { id: string } }) => {
<OrgHeader club={club} />
<OrgInfoSegment club={club} />
<OrgUpcomingEvents clubId={club.id} />
<ClubDocuments />
<div className="flex h-full w-full flex-row items-center justify-between rounded-lg bg-blue-100 px-14 py-7">
<div className="text-lg font-bold text-blue-primary">Promo text</div>
<button className="flex w-fit flex-row items-center justify-center rounded-3xl bg-blue-primary py-2.5 pl-5 pr-6 text-center text-xs font-extrabold text-white transition-colors hover:bg-blue-700">
<PlusIcon />
<div>Apply</div>
</button>
</div>
</div>
</main>
);
Expand Down
43 changes: 0 additions & 43 deletions src/components/ClubDocuments.tsx

This file was deleted.

29 changes: 8 additions & 21 deletions src/components/ContactIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,34 +120,21 @@ export const Email = ({ className }: IconProps) => {
</svg>
);
};
const logoStyling = 'fill-slate-800 transition-colors group-hover:fill-white';
export const logo: logoProps = {
discord: (
<Discord className="fill-slate-300 transition-colors group-hover:fill-white" />
),
discord: <Discord className={logoStyling} />,

youtube: (
<Youtube className="fill-slate-300 transition-colors group-hover:fill-white" />
),
youtube: <Youtube className={logoStyling} />,

twitch: '/nebula-logo.png',

facebook: (
<Facebook className="fill-slate-300 transition-colors group-hover:fill-white" />
),
facebook: <Facebook className={logoStyling} />,

twitter: (
<Twitter className="fill-slate-300 transition-colors group-hover:fill-white" />
),
twitter: <Twitter className={logoStyling} />,

instagram: (
<Instagram className="fill-slate-300 transition-colors group-hover:fill-white" />
),
website: (
<Website className="fill-slate-300 transition-colors group-hover:fill-white" />
),
email: (
<Email className="fill-slate-300 transition-colors group-hover:fill-white" />
),
instagram: <Instagram className={logoStyling} />,
website: <Website className={logoStyling} />,
email: <Email className={logoStyling} />,

other: '/Jupiter.png',
} as const;
6 changes: 0 additions & 6 deletions src/components/DirectoryOrgs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { type FC } from 'react';
import Image from 'next/image';
import type { SelectClub as Club } from '@src/server/db/models';
import JoinButton from './JoinButton';
import LikeButton from './LikeButton';
import Link from 'next/link';
import { type Session } from 'next-auth';

Expand All @@ -25,11 +24,6 @@ const OrgDirectoryCards: FC<Props> = ({ club, session, priority }) => {
priority={priority}
className="select-none object-cover"
/>
<div className="absolute left-2 right-2 top-2 flex h-fit flex-row items-center space-x-2">
<button className="ml-auto rounded-full bg-black bg-opacity-50 p-1.5 font-bold text-white transition-colors">
<LikeButton />
</button>
</div>
</div>
<div className="flex flex-col space-y-2 p-6">
<h1 className="line-clamp-1 text-2xl font-medium text-slate-800 md:text-xl">
Expand Down
22 changes: 0 additions & 22 deletions src/components/LikeButton.tsx

This file was deleted.

15 changes: 6 additions & 9 deletions src/components/OrgHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {
} from '@src/server/db/models';
import JoinButton from './JoinButton';
import { getServerAuthSession } from '@src/server/auth';
import LikeButton from './LikeButton';
import Link from 'next/link';
import { api } from '@src/trpc/server';

Expand All @@ -21,10 +20,14 @@ const OrgHeader = async ({ club }: { club: Club }) => {
<div className="relative">
<div className="h-full w-full">
<Image
src={club.image}
src={'/images/wideWave.jpg'}
alt="Picture of the club"
width={400}
style={{
width: '100%',
height: 'auto',
}}
height={150}
width={450}
className="rounded-lg object-cover"
priority
/>
Expand Down Expand Up @@ -70,12 +73,6 @@ const OrgHeader = async ({ club }: { club: Club }) => {
clubID={club.id}
isJoined={memberType !== undefined}
/>
<button
className="rounded-full bg-blue-primary p-2.5 transition-colors hover:bg-blue-700"
type="button"
>
<LikeButton />
</button>
</>
)}
<ContactButtons contacts={club.contacts || []} />
Expand Down
4 changes: 3 additions & 1 deletion src/server/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ const schema = {
...admin,
};

export const db = drizzle(postgres(env.DATABASE_URL), { schema });
export const db = drizzle(postgres(env.DATABASE_URL, { prepare: false }), {
schema,
});