Parameters: refactor and add more supported params
This patch replaces the component-based URL Parameter matcher with a hook-based approach. We now watch for, parse, and normalize URL params for 'color', 'weight', and 'size'.
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
import React, { Suspense } from "react";
|
||||
|
||||
import "./App.css";
|
||||
import Parameters from "../Parameters/Parameters";
|
||||
import Header from "../Header/Header";
|
||||
import Toolbar from "../Toolbar/Toolbar";
|
||||
import IconGrid from "../IconGrid/IconGrid";
|
||||
import Footer from "../Footer/Footer";
|
||||
import ErrorBoundary from "../ErrorBoundary/ErrorBoundary";
|
||||
import Notice from "../Notice/Notice";
|
||||
import useIconParameters from "../../hooks/useIconParameters";
|
||||
|
||||
const errorFallback = <Notice message="Search error" />;
|
||||
// const waitingFallback = <Notice type="wait" message="Loading..." />;
|
||||
const waitingFallback = <Notice type="none" message="" />;
|
||||
|
||||
const App: React.FC<any> = () => {
|
||||
useIconParameters();
|
||||
|
||||
return (
|
||||
<React.StrictMode>
|
||||
<Parameters />
|
||||
<Header />
|
||||
<main>
|
||||
<Toolbar />
|
||||
|
||||
Reference in New Issue
Block a user