Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gursheyss committed Mar 22, 2024
1 parent fcf6516 commit 12691fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Logout from '$lib/components/Logout.svelte';
let { user } = $props();
let onRoot = $derived($page.url.pathname === '/'); // eslint-disable-line
let onRoot = $derived($page.url.pathname === '/');
let showSearch = $state(false);
let searchBox: HTMLInputElement | undefined = $state();
Expand Down
3 changes: 0 additions & 3 deletions src/routes/course/[id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ export const load = async ({ params }) => {

const professorIds = reviews.map((review) => review.professorId);

// Query professorsTable to get professor names
interface Professor {
id: number;
name: string;
}

let professors: Professor[] = [];
if (professorIds.length > 0) {
// Query professorsTable to get professor names
professors = await db
.select({
id: professorsTable.id,
Expand All @@ -46,7 +44,6 @@ export const load = async ({ params }) => {
.where(inArray(professorsTable.id, professorIds));
}

// Map professor names to reviews
const reviewsWithProfessorNames = reviews.map((review) => {
const professor = professors.find((professor) => professor.id === review.professorId);
return {
Expand Down

0 comments on commit 12691fa

Please sign in to comment.