Skip to content

Commit

Permalink
chore: re-add missing type files
Browse files Browse the repository at this point in the history
  • Loading branch information
larwaa committed Aug 20, 2023
1 parent 8c248aa commit 10c6afb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useRouter } from "next/router";

import { Link } from "@/components";
import { OrderFragment, PaymentStatus } from "@/generated/graphql";

import { HeaderValuePair } from "@/types/utils";

type Props = { order: OrderFragment; field: HeaderValuePair<OrderFragment> };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import React, { ChangeEvent } from "react";

import { MarkdownForm } from "@/components/Markdown";
import { ListingOrganizationFragment } from "@/generated/graphql";

import { ListingInput } from "@/types/listings";

type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useState } from "react";

import { ListingForm } from "@/components/pages/listings/organization/ListingForm";
import { CreateListingDocument, UserOrganizationsDocument } from "@/generated/graphql";

import { ListingInput } from "@/types/listings";

const emptyListing: ListingInput = {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/ecommerce/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { OrderFragment, UserDocument, UserOrdersDocument } from "@/generated/gra
import { Layout, RootStyle } from "@/layouts/Layout";
import { addApolloState, initializeApollo } from "@/lib/apolloClient";
import { NextPageWithLayout } from "@/lib/next";

import { HeaderValuePair } from "@/types/utils";

const orderFields: HeaderValuePair<OrderFragment>[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ListingForm } from "@/components/pages/listings/organization/ListingFor
import { ListingDocument, UpdateListingDocument } from "@/generated/graphql";
import { Layout, RootStyle } from "@/layouts/Layout";
import { NextPageWithLayout } from "@/lib/next";

import { ListingInput } from "@/types/listings";

dayjs.extend(utc);
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/types/listings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { ListingWithFormIdFragment } from "@/generated/graphql";

export type ListingInput = Omit<ListingWithFormIdFragment, "startDatetime" | "endDatetime" | "chips" | "slug"> & {
startDatetime?: string;
endDatetime?: string;
case?: boolean;
application?: boolean;
interview?: boolean;
};
4 changes: 4 additions & 0 deletions frontend/src/types/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export type HeaderValuePair<T> = {
header: string;
field: keyof T;
};

0 comments on commit 10c6afb

Please sign in to comment.