Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zifahm committed Jun 22, 2023
2 parents 2bbea07 + 1253d78 commit e771824
Show file tree
Hide file tree
Showing 18 changed files with 2,143 additions and 2,711 deletions.
4 changes: 2 additions & 2 deletions apps/web/app/components/editor/PostDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { calculateLocalTime } from "../../utils/calculateLocalTime";

export default function PostDetails() {
const rootLoader = useRouteLoaderData("root") as RootData;
const loaderData = useLoaderData<PostByHandleData>();
const loaderData = useLoaderData() as PostByHandleData;
const [open, setOpen] = useState(false);
const anchorRef = useRef<HTMLAnchorElement>(null);

Expand All @@ -20,7 +20,7 @@ export default function PostDetails() {
const localTimeCal = useMemo(
() =>
calculateLocalTime(
loaderData.post?.publishedDate,
loaderData?.post?.publishedDate,
`DD MMMM YYYY ${rootLoader?.isUserSubdomain ? "hh:mm a" : ""}`
),
[loaderData.post?.publishedDate, rootLoader?.isUserSubdomain]
Expand Down
28 changes: 19 additions & 9 deletions apps/web/app/components/editor/nodes/AbandonedCartButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function $isShareAbandonedCartButtonNode(
}

function AbandonedCartButtonComponent({ title }: ShareButtonCompnentProps) {
const { postId } = useParams<{ postId: string }>();
const { postId } = useParams<{ postId?: string | undefined }>();
// changes made here should reflect the above element node for html generation
return (
<Box
Expand All @@ -105,14 +105,24 @@ function AbandonedCartButtonComponent({ title }: ShareButtonCompnentProps) {
justifyContent="center"
>
<Box margin={1}>
<Button
color="red"
text={title}
size="lg"
href={ABANDONED_CART_VALUE}
target="self"
role={postId ? "button" : "link"}
/>
{postId ? (
<Button
color="red"
text={title}
size="lg"
role="button"
type="button"
/>
) : (
<Button
color="red"
text={title}
size="lg"
href={ABANDONED_CART_VALUE}
target="self"
role="link"
/>
)}
</Box>
</Box>
);
Expand Down
22 changes: 13 additions & 9 deletions apps/web/app/components/editor/nodes/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function $isShareButtonNode(
}

function ShareButtonComponent({ href }: ShareButtonCompnentProps) {
const { postId } = useParams<{ postId: string }>();
const { postId } = useParams<{ postId?: string }>();
// changes made here should reflect the above element node for html generation
return (
<Box
Expand All @@ -104,14 +104,18 @@ function ShareButtonComponent({ href }: ShareButtonCompnentProps) {
justifyContent="center"
>
<Box margin={1}>
<Button
color="red"
text="Share"
size="lg"
href={href}
target="self"
role={postId ? "button" : "link"}
/>
{postId ? (
<Button color="red" text="Share" size="lg" role="button" />
) : (
<Button
color="red"
text="Share"
size="lg"
href={href}
target="self"
role="link"
/>
)}
</Box>
</Box>
);
Expand Down
5 changes: 2 additions & 3 deletions apps/web/app/routes/about/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { links } from "./links";
export {
GenericCatchBoundary as CatchBoundary,
GenericErrorBoundary as ErrorBoundary,
links,
};
export { links };

export const meta: MetaFunction = ({ parentsData }) => {
const rootData = parentsData.root as RootData;
Expand Down Expand Up @@ -61,9 +61,8 @@ export default function About() {
color="red"
size="lg"
text="Edit About Page"
type="button"
href="/about/edit"
role="link"
href="/about/edit"
// onClick={() => formik.handleSubmit()}
// disabled={loading}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default function ButtonEdge({
size="xs"
bgColor="white"
type="submit"
role="button"
/>
</Form>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ export default function Time({
rangeEndDate={endDate}
nextRef={endDateInput}
onChange={({ value }) => {
setStartDate(value);
handleDateChange({ date: value, value: "date1" });
if (value) {
setStartDate(value);
handleDateChange({ date: value, value: "date1" });
}
}}
rangeSelector="start"
value={startDate}
Expand All @@ -270,8 +272,10 @@ export default function Time({
rangeEndDate={endDate}
nextRef={startDateInput}
onChange={({ value }) => {
setEndDate(value);
handleDateChange({ date: value, value: "date2" });
if (value) {
setEndDate(value);
handleDateChange({ date: value, value: "date2" });
}
}}
rangeSelector="end"
value={endDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ export default function DateType({
rangeEndDate={endDate}
nextRef={endDateInput}
onChange={({ value }) => {
setStartDate(value);
handleDateChange({ date: value, value: "date1" });
if (value) {
setStartDate(value);
handleDateChange({ date: value, value: "date1" });
}
}}
rangeSelector="start"
value={startDate}
Expand All @@ -250,8 +252,10 @@ export default function DateType({
rangeEndDate={endDate}
nextRef={startDateInput}
onChange={({ value }) => {
setEndDate(value);
handleDateChange({ date: value, value: "date2" });
if (value) {
setEndDate(value);
handleDateChange({ date: value, value: "date2" });
}
}}
rangeSelector="end"
value={endDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface MyFormValues {
name: string;
}
export default function WorkflowBar() {
const loaderData = useLoaderData<AutomationWorkflowData>();
const loaderData = useLoaderData() as AutomationWorkflowData;
const navigate = useNavigate();
const fetcher = useFetcher();
const transition = useTransition();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export default function RevenueActivity() {
"routes/subscribers.$subscriberId/index"
) as SubscribersSubscriberData;

if (!loaderData.integration?.shopify?.authenticated) {
return null;
}

return (
<Box>
<Heading size="400">Revenue activity</Heading>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/app/routes/subscribers.$subscriberId.index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { GenericCatchBoundary } from "../../route-containers/GenericCatchBoundry
import { GenericErrorBoundary } from "../../route-containers/GenericErrorBoundry";
import type { SubscribersSubscriberData } from "../subscribers.$subscriberId/types";
import EmailActivity from "./EmailActivity";
import { loader } from "./loader";
import Metrics from "./Metrics";
import RevenueActivity from "./RevenueActivity";
export { loader };
import { loader } from "./loader";
export {
GenericCatchBoundary as CatchBoundary,
GenericErrorBoundary as ErrorBoundary,
loader,
};

export default function SubscribersSubscriberIndex() {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/routes/tools/Boxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const Boxes = ({ data }: { data: Pages | undefined }) => {
<IconButton
accessibilityLabel="forward"
icon="arrow-forward"
role="link"
role="button"
size="md"
/>
</Link>
Expand Down
18 changes: 8 additions & 10 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@remix-run/node": "^1.17.1",
"@remix-run/react": "^1.17.1",
"@remix-run/serve": "^1.17.1",
"@remix-validated-form/with-yup": "^2.0.3",
"@remix-validated-form/with-yup": "^3.0.1",
"@sentry/remix": "^7.56.0",
"@shopify/address": "^4.1.0",
"@uppy/core": "^3.2.1",
Expand All @@ -54,8 +54,8 @@
"dagre": "^0.8.5",
"dayjs": "^1.11.8",
"formik": "^2.4.2",
"gestalt": "^111.5.12",
"gestalt-datepicker": "^111.5.12",
"gestalt": "^115.2.0",
"gestalt-datepicker": "^115.2.0",
"graphql": "^16.7.0",
"graphql-tag": "^2.12.6",
"immer": "^9.0.19",
Expand All @@ -64,7 +64,7 @@
"lodash": "^4.17.21",
"millify": "^6.1.0",
"papaparse": "^5.4.1",
"posthog-js": "^1.68.2",
"posthog-js": "^1.68.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
Expand All @@ -77,11 +77,11 @@
"remix-etag": "^1.0.0",
"remix-params-helper": "^0.4.10",
"remix-utils": "^6.4.1",
"remix-validated-form": "^4.6.12",
"remix-validated-form": "^5.0.2",
"slug": "^8.2.2",
"suspend-concurrently": "^0.5.0",
"tiny-invariant": "^1.3.1",
"tsup": "^6.7.0",
"tsup": "^7.0.0",
"yjs": "^13.6.4",
"yup": "^0.32.11",
"zod": "^3.21.4"
Expand All @@ -96,8 +96,6 @@
"@swc/core": "^1.3.66",
"@types/css": "^0.0.33",
"@types/dagre": "^0.7.48",
"@types/gestalt": "^101.0.0",
"@types/gestalt-datepicker": "^55.2.1",
"@types/jsdom": "^21.1.1",
"@types/papaparse": "^5.3.7",
"@types/react": "^18.2.13",
Expand All @@ -109,8 +107,8 @@
"dotenv-cli": "^7.2.1",
"eslint": "^8.43.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-gestalt": "^111.5.12",
"lerna": "^6.6.2",
"eslint-plugin-gestalt": "^115.2.0",
"lerna": "^7.0.2",
"remix-flat-routes": "^0.5.8",
"rimraf": "^5.0.1",
"s3-folder-upload": "^2.3.5",
Expand Down
12 changes: 8 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"lerna": "4.0.0",
"lerna": "7.0.0",
"packages": ["*"],
"apps": ["*"],
"version": "1.27.22",
"npmClient": "yarn",
"useWorkspaces": true
"version": "0.0.1",
"command": {
"version": {
"conventionalCommits": true
}
},
"npmClient": "yarn"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"commitizen": "^4.3.0",
"cz-conventional-changelog": "3.3.0",
"lerna": "^6.6.2",
"lerna": "^7.0.2",
"prettier": "2.8.8",
"turbo": "1.10.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"devDependencies": {
"postcss": "^8.4.24",
"tsup": "^6.7.0",
"tsup": "^7.0.0",
"typescript": "^4.9.5"
},
"scripts": {
Expand Down
32 changes: 16 additions & 16 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@
"@nestjs-shopify/auth": "4.0.0",
"@nestjs-shopify/core": "^3.1.0",
"@nestjs-shopify/webhooks": "^3.0.0",
"@nestjs/apollo": "^11.0.6",
"@nestjs/bull": "^0.6.3",
"@nestjs/common": "^9.4.3",
"@nestjs/config": "^2.3.4",
"@nestjs/core": "^9.4.3",
"@nestjs/event-emitter": "^1.4.2",
"@nestjs/graphql": "^11.0.6",
"@nestjs/platform-express": "^9.4.3",
"@nestjs/schedule": "^2.2.3",
"@nestjs/swagger": "^6.3.0",
"@nestjs/apollo": "^12.0.3",
"@nestjs/bull": "^10.0.0",
"@nestjs/common": "^10.0.3",
"@nestjs/config": "^3.0.0",
"@nestjs/core": "^10.0.3",
"@nestjs/event-emitter": "^2.0.0",
"@nestjs/graphql": "^12.0.3",
"@nestjs/platform-express": "^10.0.3",
"@nestjs/schedule": "^3.0.1",
"@nestjs/swagger": "^7.0.4",
"@nestjs/throttler": "^4.1.0",
"@nestjs/typeorm": "^9.0.1",
"@nestjs/typeorm": "^10.0.0",
"@ntegral/nestjs-sentry": "^4.0.0",
"@sendgrid/client": "^7.7.0",
"@sendgrid/eventwebhook": "^7.7.0",
Expand All @@ -71,7 +71,7 @@
"graphql": "^16.7.0",
"graphql-scalars": "^1.22.2",
"handlebars": "^4.7.7",
"helmet": "^6.1.5",
"helmet": "^7.0.0",
"ioredis": "^5.3.2",
"isemail": "^3.2.0",
"json-bigint-patch": "^0.0.8",
Expand All @@ -91,7 +91,7 @@
"rxjs": "^7.8.1",
"stripe": "^12.9.0",
"tiny-invariant": "^1.3.1",
"ts-morph": "^18.0.0",
"ts-morph": "^19.0.0",
"typeorm": "^0.3.17",
"yarn": "^1.22.19"
},
Expand All @@ -100,9 +100,9 @@
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-document-nodes": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@nestjs/cli": "^9.5.0",
"@nestjs/schematics": "^9.2.0",
"@nestjs/testing": "^9.4.3",
"@nestjs/cli": "^10.0.3",
"@nestjs/schematics": "^10.0.1",
"@nestjs/testing": "^10.0.3",
"@shopify/cli": "^3.46.5",
"@types/bcryptjs": "^2.4.2",
"@types/bull": "^4.10.0",
Expand Down
1 change: 1 addition & 0 deletions packages/server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ async function bootstrap() {
scriptSrc: [`'self'`, `https: 'unsafe-inline'`],
},
},
crossOriginEmbedderPolicy: true,
}),
);

Expand Down
Loading

0 comments on commit e771824

Please sign in to comment.