Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove unused II #661

Merged
merged 4 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/charts/area/chart-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ export const ChartAreasVisualization = ({
},
});

const observations = data?.dataCubeByIri?.observations.data;

if (data?.dataCubeByIri) {
const { title, dimensions, measures, observations } = data?.dataCubeByIri;
return observations.data.length > 0 ? (
Expand Down
2 changes: 0 additions & 2 deletions app/charts/bar/chart-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export const ChartBarsVisualization = ({
},
});

const observations = data?.dataCubeByIri?.observations.data;

if (data?.dataCubeByIri) {
const { title, dimensions, measures, observations } = data?.dataCubeByIri;
return observations.data.length > 0 ? (
Expand Down
2 changes: 0 additions & 2 deletions app/charts/column/chart-column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export const ChartColumnsVisualization = ({
},
});

const observations = data?.dataCubeByIri?.observations.data;

if (data?.dataCubeByIri) {
const { title, dimensions, measures, observations } = data?.dataCubeByIri;
return observations.data.length > 0 ? (
Expand Down
2 changes: 1 addition & 1 deletion app/charts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ const chartConfigsAdjusters: ChartConfigsAdjusters = {
},
},
map: {
filters: ({ oldValue, newChartConfig, dimensions }) => {
filters: ({ oldValue, newChartConfig }) => {
return produce(newChartConfig, (draft) => {
if (!oldValue) {
draft.filters = oldValue;
Expand Down
2 changes: 0 additions & 2 deletions app/charts/line/chart-lines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ export const ChartLinesVisualization = ({
},
});

const observations = data?.dataCubeByIri?.observations.data;

if (data?.dataCubeByIri) {
const { title, dimensions, measures, observations } = data?.dataCubeByIri;

Expand Down
2 changes: 1 addition & 1 deletion app/charts/map/style-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function hasUrl(obj: AnySourceData): obj is HasUrl<AnySourceData> {
return Object.prototype.hasOwnProperty.call(obj, "url");
}

type HasLayout<T> = T extends { layout?: infer R } ? T : never;
type HasLayout<T> = T extends { layout?: infer T } ? T : never;
export function hasLayout(obj: AnyLayer): obj is HasLayout<AnySourceData> {
return Object.prototype.hasOwnProperty.call(obj, "layout");
}
Expand Down
2 changes: 0 additions & 2 deletions app/charts/scatterplot/chart-scatterplot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export const ChartScatterplotVisualization = ({
},
});

const observations = data?.dataCubeByIri?.observations.data;

if (data?.dataCubeByIri) {
const { title, dimensions, measures, observations } = data?.dataCubeByIri;
return observations.data.length > 0 ? (
Expand Down
2 changes: 0 additions & 2 deletions app/charts/table/chart-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export const ChartTableVisualization = ({
},
});

const observations = data?.dataCubeByIri?.observations.data;

if (data?.dataCubeByIri) {
const { dimensions, measures, observations } = data?.dataCubeByIri;
return observations.data.length > 0 ? (
Expand Down
2 changes: 2 additions & 0 deletions app/components/debug-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ const geographyTheme = {
value: "https://register.ld.admin.ch/opendataswiss/category/geography",
};

// @ts-ignore
const bafuCreator = {
name: "BAFU creator",
type: "DataCubeOrganization",
value:
"https://register.ld.admin.ch/opendataswiss/org/bundesamt-fur-umwelt-bafu",
};

// @ts-ignore
const mobilityTheme = {
name: "Mobility theme",
type: "DataCubeTheme",
Expand Down
9 changes: 0 additions & 9 deletions app/configurator/components/field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ import { IconName } from "@/icons";
export const ControlTabField = ({
component,
value,
disabled,
labelId,
}: {
component?: DimensionMetadataFragment;
value: string;
disabled?: boolean;
labelId: string;
}) => {
const field = useActiveFieldField({
Expand Down Expand Up @@ -165,15 +163,13 @@ export const DataFilterSelectDay = ({
dimensionIri,
label,
options,
id,
disabled,
isOptional,
controls,
}: {
dimensionIri: string;
label: string;
options: Option[];
id: string;
disabled?: boolean;
isOptional?: boolean;
controls?: React.ReactNode;
Expand Down Expand Up @@ -338,7 +334,6 @@ export const DataFilterSelectTime = ({
return (
<TimeInput
id={id}
controls={controls}
label={fullLabel}
value={fieldProps.value}
timeFormat={timeFormat}
Expand All @@ -355,7 +350,6 @@ export const TimeInput = ({
value,
timeFormat,
formatLocale,
controls,
isOptional,
onChange,
}: {
Expand All @@ -364,7 +358,6 @@ export const TimeInput = ({
value: string | undefined;
timeFormat: string;
formatLocale: TimeLocaleObject;
controls?: React.ReactNode;
isOptional: boolean | undefined;
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
}) => {
Expand Down Expand Up @@ -644,15 +637,13 @@ export const ColorPickerField = ({
};

export const ChartFieldField = ({
componentIri,
label,
field,
options,
optional,
disabled,
dataSetMetadata,
}: {
componentIri?: string;
label: string;
field: string;
options: Option[];
Expand Down
4 changes: 3 additions & 1 deletion app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"paths": {
"@/*": ["./*"]
},
"noImplicitAny": true
"noImplicitAny": true,
"noUnusedLocals": true,
"noUnusedParameters": true
},
"exclude": ["node_modules"],
"include": [
Expand Down