Skip to content

Commit

Permalink
Rename DashboardPage to QuicksightDashboardPage
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernstein committed Jan 23, 2024
1 parent 88a2722 commit b77601a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/QuicksightDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import Footer from "./Footer";
import title from "../utils/title";
import QuicksightDashboard from "./QuicksightDashboard";

export interface QuicksightDashboardPageProps extends React.Props<QuicksightDashboardPageProps> {
export interface QuicksightDashboardPageProps
extends React.Props<QuicksightDashboardPageProps> {
params: {
library?: string;
};
Expand All @@ -18,7 +19,9 @@ export interface QuicksightDashboardPageContext {
}

/** Page holds quicksight dashboards. */
export default class DashboardPage extends React.Component<QuicksightDashboardPageProps> {
export default class QuicksightDashboardPage extends React.Component<
QuicksightDashboardPageProps
> {
context: QuicksightDashboardPageContext;

static contextTypes: React.ValidationMap<QuicksightDashboardPageContext> = {
Expand All @@ -29,21 +32,19 @@ export default class DashboardPage extends React.Component<QuicksightDashboardPa
library: PropTypes.func,
};


getChildContext() {
return {
library: () => this.props.params.library,
};
}


render(): JSX.Element {
const { library } = this.props.params;
return (
<div className="quicksight-dashboard">
<Header />
<main className="body">
<QuicksightDashboard dashboardId="library"/>
<QuicksightDashboard dashboardId="library" />
</main>
<Footer />
</div>
Expand Down

0 comments on commit b77601a

Please sign in to comment.