Skip to content

Commit

Permalink
Revert css I unintentionally modified & add the source sv modal
Browse files Browse the repository at this point in the history
  • Loading branch information
gmechali committed Dec 16, 2024
1 parent 6883b9c commit 4b938e8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions static/css/place/dev_place_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ main {
}
.summary-text {
color: var(--gm-3-ref-neutral-neutral-20);
font-size: 5px;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 20px;
Expand Down Expand Up @@ -132,7 +132,7 @@ main {
}

a {
font-size: 55px;
font-size: 14px;
font-style: normal;
font-weight: 500;
line-height: 20px;
Expand Down
18 changes: 15 additions & 3 deletions static/js/place/dev_place_main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ const PlaceTopicTabs = ({
const PlaceOverviewTable = (props: { placeDcid: string }) => {
const { placeDcid } = props;
const [dataRows, setDataRows] = useState<DataRow[]>([]);
const containerRef = useRef<HTMLDivElement>(null);
const containerRef = useRef(null);
// Fetch key demographic statistics for the place when it changes
useEffect(() => {
(async () => {
Expand All @@ -336,8 +336,20 @@ const PlaceOverviewTable = (props: { placeDcid: string }) => {
return dataRow.variable.observation.metadata.provenanceUrl;
})
);
const statVarDcids = dataRows.map((dr) => { return dr.variable.dcid;});

const statVarSpecs: StatVarSpec[] = statVarDcids.map((dcid) => {
return {
statVar: dcid,
denom: '', // Initialize with an empty string or a default denominator if applicable
unit: '', // Initialize with an empty string or a default unit if applicable
scaling: 1, // Initialize with a default scaling factor
log: false, // Initialize with a default log value
};
});

return (
<table className="table">
<table className="table" ref={containerRef}>
<thead>
<tr>
<th scope="col" colSpan={2}>
Expand Down Expand Up @@ -368,7 +380,7 @@ const PlaceOverviewTable = (props: { placeDcid: string }) => {
<tr>
<td>
<div className="chart-container">
<TileSources containerRef={containerRef} sources={sourceUrls} />
<TileSources containerRef={containerRef} sources={sourceUrls} statVarSpecs={statVarSpecs} />
</div>
</td>
<td></td>
Expand Down

0 comments on commit 4b938e8

Please sign in to comment.