import * as React from "react";
import {BuildSnapshot} from "./BuildSnapshot";

/**
 * Container Component for BuildSnapshots.
 * 
 * @param {*} props input property containing an array of build data to be
 * rendered through BuildSnapshot.
 */
export const BuildSnapshotContainer = React.memo((props) =>
  {
    const SOURCE = '/builders';
    const [data, setData] = React.useState([]);

    /**
     * Fetch data when component is mounted.
     * Pass in empty array as second paramater to prevent
     * infinite callbacks as component refreshes.
     * @see <a href="www.robinwieruch.de/react-hooks-fetch-data">Fetching</a>
     */
    React.useEffect(() => {
      fetch(SOURCE)
        .then(res => res.json())
        .then(json => setData(json))
        .catch(setData([]));
    }, []);

    return (
      <div>
        {data.map(snapshotData => <BuildSnapshot buildData={snapshotData}/>)}
      </div>
    );
  }
);

@@ -302,16 +302,320 @@
  =%3E%0A  %7B%0A
+    // Number of entries to be pulled.%0A    // TODO: Determine true value for number of entries.%0A    const NUMBER = 2;%0A%0A    // The starting point from which the entries are selected.%0A    // Relative to the starting index.%0A    // TODO: vary multiplier based on page number.%0A    const OFFSET = NUMBER * 0;%0A%0A
     cons
@@ -625,17 +625,17 @@
 OURCE = 
-'
+%60
 /builder
@@ -639,10 +639,45 @@
 ders
-';
+/number=$%7BNUMBER%7D/offset=$%7BOFFSET%7D%60;%0A
 %0A   

Add Missing Parameters to Fetch #162