Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Jul 17, 2024
1 parent f3d2419 commit 251a11e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
build/
4 changes: 2 additions & 2 deletions widget/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Content = () => (
<Layout blocks={{ Header, Footer }}>
<div style={{ height: "60vh" }}>
"mob.near/post/main@81101335" // this is a very personal thing...
<p>{JSON.stringify(data)}</p>
<p>{JSON.stringify(data)}</p>
<Router
config={{
param: "page",
Expand All @@ -56,7 +56,7 @@ const Content = () => (
},
},
}}
page={"home"}
page={"home"}
/>
</div>
</Layout>
Expand Down
2 changes: 1 addition & 1 deletion widget/PR/ItemFeed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ return (
>
{Layout ? <Layout>{renderedItems}</Layout> : <>{renderedItems}</>}
</InfiniteScroll>
);
);
7 changes: 2 additions & 5 deletions widget/Router.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ function Router({ config, ...passProps }) {
if (!param) param = "page";
const defaultRoute = findDefaultRoute(routes);
const activeRoute =
(routes &&
routes.hasOwnProperty(passProps[param]) &&
routes[passProps[param]]) ||
defaultRoute;
(routes && routes.hasOwnProperty(passProps[param]) && routes[passProps[param]]) || defaultRoute;
if (!PageNotFound) PageNotFound = () => <p>404 Not Found</p>;
if (!activeRoute) {
// Handle 404 or default case for unknown routes
Expand All @@ -49,7 +46,7 @@ function Router({ config, ...passProps }) {
<Content key={param + JSON.stringify(activeRoute)}>
<Widget
src={activeRoute.path}
props={{ ...activeRoute.init, ...passProps}}
props={{ ...activeRoute.init, ...passProps }}
loading={<div style={{ height: "100%", width: "100%" }} />}
/>
</Content>
Expand Down
2 changes: 1 addition & 1 deletion widget/components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,4 @@ return (
</Button>
)}
</Wrapper>
);
);

0 comments on commit 251a11e

Please sign in to comment.