Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed app width on other gateways #290

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/Mintbase/data.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"bos.genadrop.near": {}
"mintbos.testnet": {}
}
47 changes: 31 additions & 16 deletions apps/Mintbase/widget/Mintbase/App/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
const data = fetch(`https://httpbin.org/headers`);
const gatewayURL = data?.body?.headers?.Origin ?? "";

const Container = gatewayURL.includes("near.org")
? styled.div`
width: 100%;
`
: styled.div`
position: fixed;
inset: 73px 0px 0px;
width: 100%;
overflow-y: scroll;
`;
return {
Layout: ({ variant, blocks, children, isHome }) => {
switch (variant) {
case "standard": {
const { Header, Footer } = blocks;
return (
<div
className="layout"
style={{
display: "flex",
flexDirection: "column",
width: "100%",
height: "100%",
}}
>
<Header isHome={isHome.page === "home"} />
<Container>
<div
className="content"
className="layout"
style={{
flex: 1,
display: "flex",
flexDirection: "column",
alignItems: "center",
width: "100%",
height: "100%",
}}
>
{children}
<Header isHome={isHome.page === "home"} />
<div
className="content"
style={{
flex: 1,
display: "flex",
flexDirection: "column",
alignItems: "center",
width: "100%",
}}
>
{children}
</div>
<Footer />
</div>
<Footer />
</div>
</Container>
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/Mintbase/widget/Mintbase/App/Profile/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const actualTabs = {
tabLabels: [
{ id: 0, title: "Owned" },
{ id: 1, title: "Minted" },
// { id: 2, title: "_About", hidden: !isConnected },
{ id: 2, title: "_About", hidden: !isConnected },
{ id: 3, title: "Activity" },
{ id: 4, title: "Contracts" },
// { id: 5, title: "_User Settings", hidden: !isConnected },
{ id: 5, title: "_User Settings", hidden: !isConnected },
],
};

Expand Down
Loading