Skip to content

Commit

Permalink
Merge pull request #24 from acm-ucr/khandrew1/fixBuild
Browse files Browse the repository at this point in the history
fix build error
  • Loading branch information
khandrew1 authored Oct 23, 2024
2 parents f5a95ed + f7c7efb commit d2b5ba1
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 50 deletions.
24 changes: 10 additions & 14 deletions src/components/user/profile/information.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import Select from "../../global/inputs/select";
import Input from "../../global/inputs/input";
import Radio from "../../global/inputs/radio";
import Text from "../../global/inputs/text";
import Textarea from "@/components/global/inputs/textarea";
import {
nameOptions,
majorOptions,
graduationOptions,
questionOptions,
techStackOptions,
} from "@/data/profile/profile-information";
import { questions } from "@/data/profile/profile-information";

const Information = () => {
return (
<div className="h-1/2 rounded-xl border-4 border-gray-300">
<Text meta={nameOptions} />
<Select meta={majorOptions} />
<Input />
<Radio meta={graduationOptions} />
<Textarea meta={questionOptions} />
<Select meta={techStackOptions} />
{questions.map((question, index) => {
const { type } = question;

if (type === "radio") return <Radio meta={question} key={index} />;
if (type === "textarea")
return <Textarea meta={question} key={index} />;
if (type === "select") return <Select meta={question} key={index} />;
if (type === "text") return <Text meta={question} key={index} />;
})}
</div>
);
};
Expand Down
70 changes: 41 additions & 29 deletions src/data/profile/profile-information.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
export const nameOptions = {
type: "text",
title: "Name",
placeholder: "Enter a Name",
maxLength: 250,
};
import { Questions } from "@/types/questions";

export const majorOptions = {
title: "Major",
options: ["Computer Science", "Computer Engineering", "Data Science"],
value: "",
disabled: false,
};

export const graduationOptions = {
title: "Graduation Year",
options: ["2025", "2026", "2027", "2028"],
};

export const questionOptions = {
title: "Why do you want to join ACM Ignite?",
placeholder: "I want to join ACM Ignite because...",
};

export const techStackOptions = {
title: "Tech Stack",
options: ["Typescript", "Javascript", "C/C++"],
value: "",
disabled: false,
};
export const questions: Questions[] = [
{
type: "text",
title: "Name",
placeholder: "Enter a Name",
maxLength: 250,
disabled: false,
value: "",
},
{
type: "select",
title: "Major",
options: ["Computer Science", "Computer Engineering", "Data Science"],
value: "",
disabled: false,
},
{
title: "Graduation Year",
options: [2025, 2026, 2027, 2028],
type: "radio",
disabled: false,
value: "",
},
// eventually should be an input thing here, its not in yet though
{
title: "Why do you want to join ACM Ignite?",
placeholder: "I want to join ACM Ignite because...",
type: "textarea",
maxLength: 250,
disabled: false,
value: "",
},
{
type: "select",
title: "Tech Stack",
options: ["Typescript", "Javascript", "C/C++"],
value: "",
disabled: false,
},
];
4 changes: 2 additions & 2 deletions src/forms/applications/CreateF24.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { project } from "@/types/projects";
import { Project } from "@/types/projects";
import { Questions } from "@/types/questions";

const title = "ACM Create Fall 2024";
Expand Down Expand Up @@ -39,7 +39,7 @@ const questions: Questions[] = [
},
];

const projects: project[] = [
const projects: Project[] = [
{
title: "Organization 1",
description: "This is a very cool organization!",
Expand Down
4 changes: 2 additions & 2 deletions src/forms/applications/ForgeF24.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { project } from "@/types/projects";
import { Project } from "@/types/projects";
import { Questions } from "@/types/questions";

const title = "ACM Forge Fall 2024";
Expand Down Expand Up @@ -39,7 +39,7 @@ export const questions: Questions[] = [
},
];

export const projects: project[] = [
export const projects: Project[] = [
{
title: "Organization 1",
description: "This is a very cool organization!",
Expand Down
4 changes: 2 additions & 2 deletions src/forms/applications/IgniteF24.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { project } from "@/types/projects";
import { Project } from "@/types/projects";
import { Questions } from "@/types/questions";

const title = "ACM Ignite Fall 2024";
Expand Down Expand Up @@ -39,7 +39,7 @@ export const questions: Questions[] = [
},
];

export const projects: project[] = [
export const projects: Project[] = [
{
title: "Organization 1",
description: "This is a very cool organization!",
Expand Down
2 changes: 1 addition & 1 deletion src/types/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ export interface TextInput {
disabled: boolean;
}

export type Questions = RadioInput | TextareaInput | SelectInput;
export type Questions = RadioInput | TextareaInput | SelectInput | TextInput;

0 comments on commit d2b5ba1

Please sign in to comment.