Skip to content

Commit

Permalink
housekeeping(coral): Add .prettierc, run formatter on src
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Anderson <mathieu.anderson@aiven.io>
  • Loading branch information
Mathieu Anderson committed Jul 18, 2023
1 parent 23bc4a9 commit 0672e86
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions coral/.prettierrc
@@ -0,0 +1,3 @@
{
"trailingComma": "es5"
}
Expand Up @@ -2,10 +2,10 @@ import { useEffect } from "react";
import { useSearchParams } from "react-router-dom";

const offsets = ["5", "25", "50"] as const;
type Offset = typeof offsets[number];
type Offset = (typeof offsets)[number];

const NAME = "offset";
const defaultOffset: typeof offsets[0] = "5";
const defaultOffset: (typeof offsets)[0] = "5";

function isOffset(offset: string | null): offset is Offset {
return Boolean(offset && offsets.includes(offset as Offset));
Expand Down
4 changes: 2 additions & 2 deletions coral/src/services/api.ts
Expand Up @@ -193,7 +193,7 @@ const API_PATHS = {
ApiOperations,
"getSchemaOfTopicFromSource" | "getSwitchTeams"
>]: keyof ApiPaths;
}
};

type GetSchemaOfTopicFromSource = (params: {
source: string;
Expand All @@ -218,7 +218,7 @@ const DYNAMIC_API_PATHS = {
ApiOperations,
"getSchemaOfTopicFromSource" | "getSwitchTeams"
>]: GetSchemaOfTopicFromSource | GetSwitchTeams;
}
};

type Params = URLSearchParams;

Expand Down

0 comments on commit 0672e86

Please sign in to comment.