Skip to content

Commit

Permalink
Apply formatting changes from Prettier 2.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinnl committed Jan 9, 2023
1 parent bcc3d5f commit 4dc9bbf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
4 changes: 2 additions & 2 deletions frontend/src/apiMocks/handlers.ts
Expand Up @@ -16,11 +16,11 @@ import {
} from "./mockData";

export function getHandlers(
defaultMockId: null | typeof mockIds[number] = null
defaultMockId: null | (typeof mockIds)[number] = null
): RestHandler[] {
const handlers: RestHandler[] = [];

const getMockId = (req: RestRequest): typeof mockIds[number] | null => {
const getMockId = (req: RestRequest): (typeof mockIds)[number] | null => {
const authHeader = req.headers.get("Authorization");
if (typeof authHeader !== "string") {
return defaultMockId;
Expand Down
65 changes: 33 additions & 32 deletions frontend/src/apiMocks/mockData.ts
Expand Up @@ -85,14 +85,14 @@ export const mockedRuntimeData: RuntimeData = {
MAX_MINUTES_TO_VERIFY_REAL_PHONE: 5,
};

export const mockedUsers: Record<typeof mockIds[number], UserData> = {
export const mockedUsers: Record<(typeof mockIds)[number], UserData> = {
empty: { email: "empty@example.com" },
onboarding: { email: "onboarding@example.com" },
some: { email: "some@example.com" },
full: { email: "full@example.com" },
};

export const mockedProfiles: Record<typeof mockIds[number], ProfileData> = {
export const mockedProfiles: Record<(typeof mockIds)[number], ProfileData> = {
empty: {
api_token: "empty",
avatar: "https://profile.accounts.firefox.com/v1/avatar/e",
Expand Down Expand Up @@ -175,7 +175,7 @@ export const mockedProfiles: Record<typeof mockIds[number], ProfileData> = {
},
};
export const mockedRelayaddresses: Record<
typeof mockIds[number],
(typeof mockIds)[number],
RandomAliasData[]
> = {
empty: [],
Expand Down Expand Up @@ -270,7 +270,7 @@ export const mockedRelayaddresses: Record<
],
};
export const mockedDomainaddresses: Record<
typeof mockIds[number],
(typeof mockIds)[number],
CustomAliasData[]
> = {
empty: [],
Expand Down Expand Up @@ -300,35 +300,36 @@ export const mockedDomainaddresses: Record<
],
};

export const mockedRealphones: Record<typeof mockIds[number], RealPhoneData> = {
empty: [],
onboarding: [],
some: [
{
id: 0,
number: "+14155552671",
verification_code: "123456",
verification_sent_date: "2022-07-27T10:17:29.775Z",
verified: true,
verified_date: "2022-07-27T10:18:01.801Z",
country_code: "US",
},
],
full: [
{
id: 0,
number: "+14155552671",
verification_code: "123456",
verification_sent_date: "2022-07-27T10:17:29.775Z",
verified: true,
verified_date: "2022-07-27T10:18:01.801Z",
country_code: "US",
},
],
};
export const mockedRealphones: Record<(typeof mockIds)[number], RealPhoneData> =
{
empty: [],
onboarding: [],
some: [
{
id: 0,
number: "+14155552671",
verification_code: "123456",
verification_sent_date: "2022-07-27T10:17:29.775Z",
verified: true,
verified_date: "2022-07-27T10:18:01.801Z",
country_code: "US",
},
],
full: [
{
id: 0,
number: "+14155552671",
verification_code: "123456",
verification_sent_date: "2022-07-27T10:17:29.775Z",
verified: true,
verified_date: "2022-07-27T10:18:01.801Z",
country_code: "US",
},
],
};

export const mockedRelaynumbers: Record<
typeof mockIds[number],
(typeof mockIds)[number],
RelayNumberData
> = {
empty: [],
Expand Down Expand Up @@ -370,7 +371,7 @@ export const mockedRelaynumbers: Record<
};

export const mockedInboundContacts: Record<
typeof mockIds[number],
(typeof mockIds)[number],
InboundContactData
> = {
empty: [],
Expand Down

0 comments on commit 4dc9bbf

Please sign in to comment.