Skip to content

Commit

Permalink
Remove berlin types (#519)
Browse files Browse the repository at this point in the history
* remove all types in berlin

* remove types from berlin
  • Loading branch information
diegoalzate authored May 17, 2024
1 parent f87c5a6 commit bd09454
Show file tree
Hide file tree
Showing 15 changed files with 7 additions and 164 deletions.
4 changes: 2 additions & 2 deletions packages/berlin/src/pages/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
putUsersToGroups,
postUsersToGroups,
GetGroupsResponse,
GetEventsResponse,
} from 'api';

// Components
Expand All @@ -37,7 +38,6 @@ import { formatGroups } from '../utils/formatGroups';
import { useAppStore } from '../store';
import { Body } from '../components/typography/Body.styled';
import { useEffect, useMemo } from 'react';
import { DBEvent } from '../types/DBEventType';

const ACADEMIC_CREDENTIALS = ['Bachelors', 'Masters', 'PhD', 'JD', 'None'];

Expand Down Expand Up @@ -158,7 +158,7 @@ function AccountForm({
initialUser: InitialUser;
user: GetUserResponse | null | undefined;
groups: GetGroupsResponse[] | null | undefined;
events: DBEvent[] | null | undefined;
events: GetEventsResponse | null | undefined;
}) {
const navigate = useNavigate();
const theme = useAppStore((state) => state.theme);
Expand Down
5 changes: 1 addition & 4 deletions packages/berlin/src/pages/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import {
handleLocalVote,
} from '../utils/voting';

// Types
import { ResponseUserVotesType } from '../types/CycleType';

// Store
import { useAppStore } from '../store';

Expand All @@ -46,7 +43,7 @@ import IconButton from '../components/icon-button';
import Textarea from '../components/textarea';
import { INITIAL_HEARTS } from '../utils/constants';

type LocalUserVotes = ResponseUserVotesType | { optionId: string; numOfVotes: number }[];
type LocalUserVotes = { optionId: string; numOfVotes: number }[];

function Comments() {
const theme = useAppStore((state) => state.theme);
Expand Down
7 changes: 2 additions & 5 deletions packages/berlin/src/pages/Cycle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import {
handleLocalVote,
} from '../utils/voting';

// Types
import { ResponseUserVotesType } from '../types/CycleType';

// Store
import { useAppStore } from '../store';

Expand All @@ -38,7 +35,7 @@ import OptionCard from '../components/option-card';
import { FIVE_MINUTES_IN_SECONDS, INITIAL_HEARTS } from '../utils/constants';

type Order = 'asc' | 'desc';
type LocalUserVotes = ResponseUserVotesType | { optionId: string; numOfVotes: number }[];
type LocalUserVotes = { optionId: string; numOfVotes: number }[];

function Cycle() {
const queryClient = useQueryClient();
Expand Down Expand Up @@ -116,7 +113,7 @@ function Cycle() {
}
}, [cycleState, time, formattedTime]);

const updateInitialVotesAndHearts = (votes: ResponseUserVotesType) => {
const updateInitialVotesAndHearts = (votes: GetUserVotesResponse) => {
const givenVotes = votes
.map((option) => option.numOfVotes)
.reduce((prev, curr) => prev + curr, 0);
Expand Down
1 change: 0 additions & 1 deletion packages/berlin/src/pages/Event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { GetCycleResponse, fetchEvent, fetchEventCycles } from 'api';
import { Body } from '../components/typography/Body.styled';
import { FlexColumn } from '../components/containers/FlexColum.styled';
import { Table } from '../components/table';
// import BackButton from '../components/back-button';
import Button from '../components/button';
import EventCard from '../components/event-card';
import Link from '../components/link';
Expand Down
6 changes: 2 additions & 4 deletions packages/berlin/src/pages/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
fetchRegistrationFields,
fetchRegistrations,
fetchUsersToGroups,
GetEventResponse,
GetRegistrationsResponseType,
GetUsersToGroupsResponse,
postRegistration,
Expand All @@ -28,9 +29,6 @@ import {
// Hooks
import useUser from '../hooks/useUser';

// Types
import { DBEvent } from '../types/DBEventType';

// Components
import { Error } from '../components/typography/Error.styled';
import { FlexColumn } from '../components/containers/FlexColum.styled';
Expand Down Expand Up @@ -242,7 +240,7 @@ function RegisterForm(props: {
registrationFields: GetRegistrationFieldsResponse | null | undefined;
registrationId: string | null | undefined;
groupId: string | null | undefined;
event: DBEvent | null | undefined;
event: GetEventResponse | null | undefined;
show: boolean;
mode: 'edit' | 'create';
onRegistrationFormCreate?: (newRegistrationId: string) => void;
Expand Down
7 changes: 0 additions & 7 deletions packages/berlin/src/types/ButtonType.ts

This file was deleted.

63 changes: 0 additions & 63 deletions packages/berlin/src/types/CycleType.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/berlin/src/types/DBEventType.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/berlin/src/types/ForumQuestionType.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/berlin/src/types/GroupType.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/berlin/src/types/RegistrationFieldOptionType.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/berlin/src/types/RegistrationFieldType.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/berlin/src/types/RegistrationType.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/berlin/src/types/UserAttributesType.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/core/src/types/AuthUserType.ts

This file was deleted.

0 comments on commit bd09454

Please sign in to comment.