Skip to content

Commit

Permalink
Prettier Check
Browse files Browse the repository at this point in the history
  • Loading branch information
spiderCSman committed Sep 17, 2024
1 parent 79b51c6 commit 9e0373d
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 55 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/app/api/registration/create/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ export async function POST(req: Request) {
skills: body.skills.map((v) => v.text.toLowerCase()),
profilePhoto: user.imageUrl,
isFullyRegistered: true,
phoneNumber:body.phoneNumber,
phoneNumber: body.phoneNumber,
isSearchable: body.profileIsSearchable,
countryOfResidence:body.countryOfResidence,
countryOfResidence: body.countryOfResidence,
});

await tx.insert(userHackerData).values({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/dash/pass/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function EventPass({ qrPayload, user, clerk, guild }: EventPassProps) {
</div>
<div className="event-pass-img relative flex h-full w-full flex-col items-center justify-evenly">
<div className="absolute left-1/2 top-1/2 aspect-square w-[200px] -translate-x-1/2 -translate-y-[65%] bg-slate-400 opacity-60 blur-[50px] will-change-transform"></div>
<div className="relative flex w-full items-center justify-center h-[65%]">
<div className="relative flex h-[65%] w-full items-center justify-center">
<Image
src={c.eventPassBgImage}
alt={""}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@

.register-clip {
clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}
}
4 changes: 2 additions & 2 deletions apps/web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import WorkWithUs from "@/components/landing/WorkWithUs";
import TrailerSection from "@/components/landing/TrailerSection";
import { Suspense } from "react";
import { Skeleton } from "@/components/shadcn/ui/skeleton";
import {WavyBackground} from "@/components/landing/WavyBackground";
import { WavyBackground } from "@/components/landing/WavyBackground";

const oswald = Oswald({
variable: "--font-oswald",
Expand Down Expand Up @@ -62,4 +62,4 @@ export default function Home() {
}

export const runtime = "edge";
export const revalidate = 30;
export const revalidate = 30;
21 changes: 9 additions & 12 deletions apps/web/src/components/landing/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,31 @@ export default function Home() {
<div
className={`z-20 mx-4 flex flex-col items-center space-y-3 md:flex-row md:space-y-0`}
>
<ShinyLogo/>
<ShinyLogo />
<h1 className="bg-gradient-to-b from-orange-600 via-yellow-300 to-orange-600 bg-clip-text p-5 pl-2 font-bttf text-5xl text-transparent sm:text-7xl lg:text-8xl">
<span className="text-7xl sm:text-8xl md:text-[length:inherit]">
{"HACK<"}
</span>
<br/>
<br />
{"&future>"}
</h1>
</div>
<p className="z-20 mx-2 mb-6 text-center font-mono text-xl font-bold italic text-orange-400 md:mx-0 xl:mb-8 2xl:text-3xl">
October 26th - 27th 2024
</p>
<div className="w-full relative hover:scale-125 ease-in-out duration-150">
<Link href={'/register'}>
<div className="relative max-w-[250px] lg:max-w-[475px] mx-auto my-10">
<div
className="absolute z-[5] h-[64px] w-full max-w-[500px] hover:cursor-pointer bg-white mx-auto flex items-center justify-center register-clip">
<h2 className="bg-gradient-to-b from-orange-600 via-yellow-300 to-orange-600 bg-clip-text px-2 font-bttf text-2xl lg:text-5xl text-transparent lg:mt-3">
<div className="relative w-full duration-150 ease-in-out hover:scale-125">
<Link href={"/register"}>
<div className="relative mx-auto my-10 max-w-[250px] lg:max-w-[475px]">
<div className="register-clip absolute z-[5] mx-auto flex h-[64px] w-full max-w-[500px] items-center justify-center bg-white hover:cursor-pointer">
<h2 className="bg-gradient-to-b from-orange-600 via-yellow-300 to-orange-600 bg-clip-text px-2 font-bttf text-2xl text-transparent lg:mt-3 lg:text-5xl">
register
</h2>
</div>
<div
className="translate-y-2 absolute h-[64px] w-full max-w-[500px] hover:cursor-pointer bg-orange-400 mx-auto flex items-center justify-center register-clip"></div>
<div className="register-clip absolute mx-auto flex h-[64px] w-full max-w-[500px] translate-y-2 items-center justify-center bg-orange-400 hover:cursor-pointer"></div>
</div>
</Link>
</div>
<Overlay/>
<Overlay />
</main>
);
}
Expand All @@ -42,7 +40,6 @@ function Overlay() {
return (
<div className="pointer-events-none fixed left-0 top-0 z-50 h-full w-screen select-none p-5 pt-16">
<div className="relative h-full w-full">

<p className="absolute bottom-0 left-0 w-full text-center font-mono text-orange-400">
ROWDYHACKS X · SAN PEDRO I, UTSA
</p>
Expand Down
13 changes: 6 additions & 7 deletions apps/web/src/components/registration/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
shirtSize: "" as any,
schoolID: "",
university: "",
phoneNumber:"",
countryOfResidence:"",
phoneNumber: "",
countryOfResidence: "",
},
});

Expand All @@ -116,10 +116,9 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
}
}, [universityValue]);


useEffect(()=>{
console.log(countryValue)
},[countryValue])
useEffect(() => {
console.log(countryValue);
}, [countryValue]);

async function onSubmit(data: z.infer<typeof RegisterFormValidator>) {
console.log(data);
Expand Down Expand Up @@ -180,7 +179,7 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
setIsLoading(false);
alert(
`Something went wrong while attempting to register. Please try again. If this is a continuing issue, please reach out to us at ${c.issueEmail}.`,
)
);
return console.log(
`Recieved a unexpected response from the server. Please try again. If this is a continuing issue, please reach out to us at ${c.issueEmail}.`,
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/shared/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface NavbarProps {
export default async function Navbar({ className }: NavbarProps) {
const user = await currentUser();
return (
<div className="z-50 w-screen dark:bg-black bg-white">
<div className="z-50 w-screen bg-white dark:bg-black">
<div
className={cn(
`relative top-0 z-50 h-16 w-screen border-b border-b-border bg-nav ${oswald.variable}`,
Expand Down
46 changes: 25 additions & 21 deletions apps/web/src/validators/shared/RegisterForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const defaultPrettyError = {
const noProfanityValidator = (val: any) => !isProfane(val);
const noProfanityMessage = "Profanity is not allowed";

const countryCodesArray = c.registration.countries.map(countryObject => countryObject.code);
const countryCodesArray = c.registration.countries.map(
(countryObject) => countryObject.code,
);

export const RegisterFormValidator = z.object({
firstName: z
Expand Down Expand Up @@ -49,25 +51,25 @@ export const RegisterFormValidator = z.object({
z.literal("PREFERNOTSAY", defaultPrettyError),
]),
race: z.union([
z.literal("Asian Indian",defaultPrettyError),
z.literal("Asian (Other)",defaultPrettyError),
z.literal("Black or African",defaultPrettyError),
z.literal("Chinese",defaultPrettyError),
z.literal("Filipino",defaultPrettyError),
z.literal("Guamanian or Chamorro",defaultPrettyError),
z.literal("Hispanic / Latino / Spanish Origin",defaultPrettyError),
z.literal("Japanese",defaultPrettyError),
z.literal("Korean",defaultPrettyError),
z.literal("Middle Eastern",defaultPrettyError),
z.literal("Native American or Alaskan Native",defaultPrettyError),
z.literal("Native Hawaiian",defaultPrettyError),
z.literal("Samoan",defaultPrettyError),
z.literal("Vietnamese",defaultPrettyError),
z.literal("White",defaultPrettyError),
z.literal("Other Asian (Thai, Cambodian, etc)",defaultPrettyError),
z.literal("Other Pacific Islander",defaultPrettyError),
z.literal("Other",defaultPrettyError),
z.literal("Prefer Not to Answer",defaultPrettyError),
z.literal("Asian Indian", defaultPrettyError),
z.literal("Asian (Other)", defaultPrettyError),
z.literal("Black or African", defaultPrettyError),
z.literal("Chinese", defaultPrettyError),
z.literal("Filipino", defaultPrettyError),
z.literal("Guamanian or Chamorro", defaultPrettyError),
z.literal("Hispanic / Latino / Spanish Origin", defaultPrettyError),
z.literal("Japanese", defaultPrettyError),
z.literal("Korean", defaultPrettyError),
z.literal("Middle Eastern", defaultPrettyError),
z.literal("Native American or Alaskan Native", defaultPrettyError),
z.literal("Native Hawaiian", defaultPrettyError),
z.literal("Samoan", defaultPrettyError),
z.literal("Vietnamese", defaultPrettyError),
z.literal("White", defaultPrettyError),
z.literal("Other Asian (Thai, Cambodian, etc)", defaultPrettyError),
z.literal("Other Pacific Islander", defaultPrettyError),
z.literal("Other", defaultPrettyError),
z.literal("Prefer Not to Answer", defaultPrettyError),
]),
ethnicity: z.union([
z.literal("Hispanic or Latino", defaultPrettyError),
Expand Down Expand Up @@ -165,7 +167,9 @@ export const RegisterFormValidator = z.object({
.refine(noProfanityValidator, noProfanityMessage),
profileDiscordName: z
.string()
.max(40, { message: "Username should not be longer than 40 characters" }),
.max(40, {
message: "Username should not be longer than 40 characters",
}),
pronouns: z.string().min(1).max(15),
bio: z
.string()
Expand Down
9 changes: 2 additions & 7 deletions packages/config/hackkit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -972,13 +972,8 @@ const publicRoutes = [
/^\/user\//,
"/404",
"/bugreport",
"/faq"
"/faq",
];

export default c;
export {
defaultTheme,
bucketResumeBaseUploadUrl,
perms,
publicRoutes,
};
export { defaultTheme, bucketResumeBaseUploadUrl, perms, publicRoutes };
4 changes: 3 additions & 1 deletion packages/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ export const userCommonData = pgTable("user_common_data", {
skills: json("skills").notNull().$type<string[]>().default([]),
profilePhoto: varchar("profile_photo", { length: 255 }).notNull(),
phoneNumber: varchar("phone_number", { length: 30 }).notNull(),
countryOfResidence: varchar("country_of_residence", { length: 3 }).notNull(),
countryOfResidence: varchar("country_of_residence", {
length: 3,
}).notNull(),

// metadata
isFullyRegistered: boolean("is_fully_registered").notNull().default(false),
Expand Down

0 comments on commit 9e0373d

Please sign in to comment.