Skip to content

Commit 69613d0

Browse files
committed
Fix
1 parent 527963b commit 69613d0

File tree

15 files changed

+39
-34
lines changed

15 files changed

+39
-34
lines changed

app/javascript/components/BundleEdit/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export const Layout = ({
188188
<div className={preview ? "squished fixed-aside flex-1 lg:grid lg:grid-cols-[1fr_30vw]" : "flex-1"}>
189189
{children}
190190
{preview ? (
191-
<aside aria-label="Preview">
191+
<aside aria-label="Preview" className="!sticky top-0 min-h-screen self-start overflow-y-auto">
192192
<header>
193193
<h2>Preview</h2>
194194
<WithTooltip tip="Preview">
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as React from "react";
2+
3+
import { classNames } from "$app/utils/classNames";
4+
5+
export const PoweredByFooter = ({ className }: { className?: string }) => (
6+
<footer className={classNames("py-16 text-center", className)}>
7+
Powered by <span className="logo-full" />
8+
</footer>
9+
);

app/javascript/components/Product/Layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ const SectionEditor = ({
120120
{sections.map((section, i) => (
121121
<section key={section.id} id={section.id} className="border-b border-border py-16">
122122
<AddSectionButton index={i} />
123-
{section.id ? <EditSection section={section} /> : children}
123+
{section.id ? (
124+
<EditSection section={section} />
125+
) : (
126+
<div className="mx-auto w-full max-w-6xl">{children}</div>
127+
)}
124128
{i === sections.length - 1 ? <AddSectionButton index={i + 1} position="top" /> : null}
125129
</section>
126130
))}

app/javascript/components/ProductEdit/Layout.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,7 @@ export const Layout = ({
252252
<>
253253
{saveButton}
254254
<WithTooltip tip={saveButtonTooltip}>
255-
<Button
256-
color="accent"
257-
disabled={isBusy}
258-
onClick={() => void setPublished(true).then(() => navigate.current(`${rootPath}/share`))}
259-
>
255+
<Button color="accent" disabled={isBusy} onClick={() => void setPublished(true)}>
260256
{isPublishing ? "Publishing..." : "Publish and continue"}
261257
</Button>
262258
</WithTooltip>
@@ -308,7 +304,7 @@ export const Layout = ({
308304
<div className={preview ? "squished fixed-aside flex-1 lg:grid lg:grid-cols-[1fr_30vw]" : "flex-1"}>
309305
{children}
310306
{preview ? (
311-
<aside aria-label="Preview">
307+
<aside aria-label="Preview" className="!sticky top-0 min-h-screen self-start overflow-y-auto">
312308
<header>
313309
<h2>Preview</h2>
314310
<WithTooltip tip="Preview">

app/javascript/components/Profile/EditSections.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export const SectionLayout = ({
282282
</button>
283283
</div>
284284
<div ref={scrollRef} style={{ position: "absolute" }} />
285-
{children}
285+
<div className="mx-auto w-full max-w-6xl">{children}</div>
286286
</>
287287
);
288288
};

app/javascript/components/server-components/AffiliatesPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ const AffiliatesTab = () => {
460460
}
461461
navigation={<AffiliatesNavigation />}
462462
>
463-
<div style={{ display: "grid", gap: "var(--spacer-7)" }}>
463+
<div className="p-4 lg:p-8" style={{ display: "grid", gap: "var(--spacer-7)" }}>
464464
{navigation.state === "loading" && affiliates.length === 0 ? (
465465
<div style={{ justifySelf: "center" }}>
466466
<Progress width="5rem" />

app/javascript/components/server-components/GenerateInvoicePage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { assertResponseError } from "$app/utils/request";
77
import { register } from "$app/utils/serverComponentUtil";
88

99
import { Button } from "$app/components/Button";
10+
import { PoweredByFooter } from "$app/components/PoweredByFooter";
1011
import { showAlert } from "$app/components/server-components/Alert";
1112

1213
type FieldState = { value: string; error?: boolean };
@@ -270,9 +271,7 @@ const GenerateInvoicePage = ({
270271
</Button>
271272
</footer>
272273
</div>
273-
<footer style={{ textAlign: "center", padding: "var(--spacer-4)" }}>
274-
Powered by <span className="logo-full" />
275-
</footer>
274+
<PoweredByFooter />
276275
</>
277276
);
278277
};

app/javascript/components/server-components/Product/IframePage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createCast } from "ts-safe-cast";
33

44
import { register } from "$app/utils/serverComponentUtil";
55

6+
import { PoweredByFooter } from "$app/components/PoweredByFooter";
67
import { Product, useSelectionFromUrl, Props as ProductProps } from "$app/components/Product";
78
import { useElementDimensions } from "$app/components/useElementDimensions";
89
import { useRunOnce } from "$app/components/useRunOnce";
@@ -29,9 +30,7 @@ const IframePage = (props: ProductProps) => {
2930
ctaLabel="Add to cart"
3031
/>
3132
</section>
32-
<footer style={{ borderTop: "none", padding: 0 }}>
33-
Powered by <span className="logo-full" />
34-
</footer>
33+
<PoweredByFooter className="p-0" />
3534
</div>
3635
</div>
3736
);

app/javascript/components/server-components/Product/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ import { createCast } from "ts-safe-cast";
33

44
import { register } from "$app/utils/serverComponentUtil";
55

6+
import { PoweredByFooter } from "$app/components/PoweredByFooter";
67
import { Layout, Props } from "$app/components/Product/Layout";
78

89
const ProductPage = (props: Props) => (
9-
<div className="custom-sections mx-auto w-full max-w-6xl">
10+
<div className="custom-sections">
1011
<Layout {...props} />
11-
<footer>
12-
Powered by <span className="logo-full" />
13-
</footer>
12+
<PoweredByFooter />
1413
</div>
1514
);
1615

app/javascript/components/server-components/Purchase/ProductPage.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createCast } from "ts-safe-cast";
33

44
import { register } from "$app/utils/serverComponentUtil";
55

6+
import { PoweredByFooter } from "$app/components/PoweredByFooter";
67
import { Product, useSelectionFromUrl, Props as ProductProps } from "$app/components/Product";
78

89
const PurchaseProductPage = (props: ProductProps) => {
@@ -14,9 +15,7 @@ const PurchaseProductPage = (props: ProductProps) => {
1415
<section>
1516
<Product {...props} selection={selection} setSelection={setSelection} />
1617
</section>
17-
<footer style={{ borderTop: "none", padding: 0 }}>
18-
Powered by <span className="logo-full" />
19-
</footer>
18+
<PoweredByFooter className="p-0" />
2019
</div>
2120
</div>
2221
);

0 commit comments

Comments
 (0)