@sample-stack/counter-module-browser
Version:
Sample core for higher packages to depend on
29 lines (28 loc) • 991 B
JavaScript
import {jsxs,jsx}from'@emotion/react/jsx-runtime';import {useLocation,Link}from'react-router-dom';import'../constants/action-types.js';import {CONNECTED_REACT_ROUTER_ROUTES_TYPES}from'../constants/routes-types.js';const HelloChild = () => {
const {
pathname,
search,
hash
} = useLocation();
return jsxs("div", {
children: ["Hello-Child", jsxs("ul", {
children: [jsx("li", {
children: jsx(Link, {
to: `${CONNECTED_REACT_ROUTER_ROUTES_TYPES.HELLO}?color=Blue&size=40`,
children: "with query string"
})
}), jsx("li", {
children: jsx(Link, {
to: `${CONNECTED_REACT_ROUTER_ROUTES_TYPES.HELLO}#lovelove`,
children: "with hash"
})
})]
}), jsxs("div", {
children: ["pathname: ", pathname]
}), jsxs("div", {
children: ["search: ", search]
}), jsxs("div", {
children: ["hash: ", hash]
})]
});
};export{HelloChild};//# sourceMappingURL=HelloChild.js.map