Skip to content

Commit

Permalink
migrate template to typescript, migrate mapper panel using luke's cha…
Browse files Browse the repository at this point in the history
…nges
  • Loading branch information
kavigupta committed Aug 14, 2024
1 parent 31786ee commit 8af8b0f
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 172 deletions.
2 changes: 1 addition & 1 deletion react/src/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import "./style.css";
import "./common.css";
import { PageTemplate } from "./page_template/template.js";
import { PageTemplate } from "./page_template/template";
import { headerTextClass } from './utils/responsive';


Expand Down
2 changes: 1 addition & 1 deletion react/src/components/article-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, { useRef } from 'react';
import { StatisticRowRaw } from "./table";
import { Map } from "./map";
import { Related } from "./related-button";
import { PageTemplate } from "../page_template/template.js";
import { PageTemplate } from "../page_template/template";
import "../common.css";
import "./article.css";
import { load_article } from './load-article';
Expand Down
2 changes: 1 addition & 1 deletion react/src/components/comparison-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';

import { StatisticRowRaw, StatisticRowRawCellContents, StatisticRow } from "./table";
import { MapGeneric } from "./map";
import { PageTemplate, PageTemplateClass } from "../page_template/template.js";
import { PageTemplate, PageTemplateClass } from "../page_template/template";
import "../common.css";
import "./article.css";
import { load_article } from './load-article';
Expand Down
8 changes: 4 additions & 4 deletions react/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function Header(props: {
hamburger_open: boolean,
set_hamburger_open: (newValue: boolean) => void,
has_universe_selector: boolean,
all_universes: string[],
all_universes?: string[],
has_screenshot: boolean,
screenshot_mode: boolean,
initiate_screenshot: (curr_universe: string) => void
Expand All @@ -36,7 +36,7 @@ export function Header(props: {
{!mobileLayout() && props.has_universe_selector
? <div style={{ paddingRight: "0.5em" }}>
<UniverseSelector
all_universes={props.all_universes}
all_universes={props.all_universes!}
/>
</div>
: undefined}
Expand Down Expand Up @@ -79,7 +79,7 @@ function TopLeft(props: {
hamburger_open: boolean,
set_hamburger_open: (newValue: boolean) => void,
has_universe_selector: boolean,
all_universes: string[],
all_universes?: string[],
}) {
if (mobileLayout()) {
return (
Expand All @@ -89,7 +89,7 @@ function TopLeft(props: {
{
props.has_universe_selector ?
<UniverseSelector
all_universes={props.all_universes}
all_universes={props.all_universes!}
/> :
<HeaderImage />
}
Expand Down
Loading

0 comments on commit 8af8b0f

Please sign in to comment.