Skip to content

Commit

Permalink
build: Fix the web build
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Mar 5, 2024
1 parent 2413f0e commit aceece8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/browser-extension/src/OptionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function OptionsPage() {
);
}
} else if (whoami) {
loggedInMessage = <span>{whoami.name}</span>;
loggedInMessage = <span>{whoami.email}</span>;
} else {
loggedInMessage = <Spinner />;
}
Expand Down
8 changes: 3 additions & 5 deletions packages/db/drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import "dotenv/config";
import type { Config } from "drizzle-kit";

if (!process.env.DATA_DIR) {
throw new Error("DATA_DIR environment variable is required");
}

const databaseURL = `${process.env.DATA_DIR}/db.db`;
const databaseURL = process.env.DATA_DIR
? `${process.env.DATA_DIR}/db.db`
: "./db.db";

export default {
schema: "./schema.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/trpc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import superjson from "superjson";

type User = {
id: string;
name: string;
email: string;
name?: string | null | undefined;
email?: string | null | undefined;
role: "admin" | "user" | null;
};

Expand Down
4 changes: 2 additions & 2 deletions packages/trpc/routers/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export const usersAppRouter = router({
.output(
z.object({
id: z.string(),
name: z.string(),
email: z.string(),
name: z.string().nullish(),
email: z.string().nullish(),
}),
)
.query(async ({ ctx }) => {
Expand Down

0 comments on commit aceece8

Please sign in to comment.