Skip to content

pointsをIndex.tsxからJSONに変更 #63

@kyoya0819

Description

@kyoya0819

現状以下のようにしているpointsを

const pointCatalog: PointMeta[] = [
  {
    url:
      "https://raw.githubusercontent.com/Code-for-Funabashi/open-data-parser/main/data/kosodate-map/syokibohoikuichiran.json",
    type: "小規模保育園",
    icon: greenIcon,
  },
  // 略
];

をJSONへの移行をすることで、新 Index.tsx(旧 KosodateMap.tsx)の可読性向上に寄与できると考えます。

import React, { FC } from "react";

import Map from "components/Map/Map";

import points from "data/points/points";

const Index: FC = () => {
  return <Map pointCatalog={points()} />;
};
export default Index;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions