Skip to content

Commit

Permalink
fix: add suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsp45 committed Mar 26, 2024
1 parent c131e14 commit 1b12fd3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/teamFormation.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import { useState } from "react";
import JoinTeam from "./teamFormation/joinTeam.jsx";
import CreateTeam from "./teamFormation/createTeam.jsx";

Expand Down
1 change: 0 additions & 1 deletion src/components/teamFormation/createTeam.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default function CreateTeam() {
<div className="mx-auto max-w-7xl px-4 sm:px-0 pb-24">
<div className="mx-auto max-w-3xl">
<form
encType="multipart/form-data"
onSubmit={submit}
className="space-y-5"
>
Expand Down
4 changes: 1 addition & 3 deletions src/components/teamFormation/joinTeam.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default function JoinTeam() {
<div className="mx-auto max-w-3xl">

<form
encType="multipart/form-data"
onSubmit={submit}
className="space-y-5"
>
Expand All @@ -60,7 +59,6 @@ export default function JoinTeam() {
placeholder="Enter your confirmation code"
/>


{responseErrors.length > 0 && (
<div class="rounded-md bg-red-50 p-4">
<div class="flex">
Expand Down Expand Up @@ -103,7 +101,7 @@ export default function JoinTeam() {
</button>
{showModal &&
<ConfirmationModal
placeHolder="Are you sure you want to create this team?"
placeHolder="Are you sure you want to join this team?"
closeModal={closeModal}
/>
}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/api/teams/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export const POST: APIRoute = async ({ request }) => {
const { data, error } = await supabase.rpc("create_team", insertion_data);

if (error) {
console.error(error);
errors.push("There was an error with your credentials. Check if you are already in a team or if you are not registered.");
errors.push("There was an error with your submission. Please try again!");

return new Response(
JSON.stringify({
Expand Down

0 comments on commit 1b12fd3

Please sign in to comment.