Skip to content

Commit

Permalink
Merge branch 'main' into new-consulting-page-breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinator444 committed Nov 28, 2024
2 parents 887708b + 203b63d commit 7d9cf56
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 18 deletions.
5 changes: 5 additions & 0 deletions content/megamenu/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@
"name": "Past User Groups",
"url": "https://www.youtube.com/playlist?list=PLpiOR7CBNvlpmhfwQeIVhbqZKxV-do0wY",
"widgetType": "standardLink"
},
{
"name": "Northwind365",
"url": "https://northwind365.com",
"widgetType": "standardLink"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion content/training/internship-fullstack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ trainingHeader:
heroBackground: /images/SSWPolygons.png
person: /images/piers.png
seo:
title: Full Stack Developer
title: SSW Developer Internship
description: >
Training Full Stack Developer | Training | Full Stack ASP.NET MVC, Angular,
and Microsoft Azure Development Consultancy.
Expand Down
2 changes: 1 addition & 1 deletion context/app-insight-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ReactPlugin,
} from "@microsoft/applicationinsights-react-js";
import { ApplicationInsights } from "@microsoft/applicationinsights-web";
import { ReactNode, useEffect, useMemo } from "react";
import React, { ReactNode, useEffect, useMemo } from "react";

export function AppInsightsProvider({ children }: { children: ReactNode }) {
const reactPlugin = useMemo(() => new ReactPlugin(), []);
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.1",
"@tinacms/cli": "^1.6.9",
"@tinacms/cli": "1.6.9",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20.17.6",
"@types/react": "^18.3.12",
Expand Down Expand Up @@ -56,8 +56,8 @@
"@headlessui/react": "^1.7.19",
"@headlessui/tailwindcss": "^0.2.1",
"@marketsystems/nextjs13-appdir-breadcrumbs": "^1.0.4",
"@microsoft/applicationinsights-react-js": "17.3.0",
"@microsoft/applicationinsights-web": "3.3.1",
"@microsoft/applicationinsights-react-js": "^17.3.4",
"@microsoft/applicationinsights-web": "^3.3.4",
"@next/bundle-analyzer": "^15.0.3",
"@next/third-parties": "^14.2.15",
"@radix-ui/react-dropdown-menu": "^2.1.2",
Expand All @@ -67,7 +67,7 @@
"@tanstack/react-query-devtools": "^5.59.0",
"animate-css-grid": "^1.5.1",
"aos": "^2.3.4",
"applicationinsights": "^2.9.5",
"applicationinsights": "^3.4.0",
"axios": "^1.7.7",
"classnames": "^2.5.1",
"clsx": "^2.1.1",
Expand Down Expand Up @@ -97,7 +97,7 @@
"tailwind-merge": "^2.5.4",
"tailwindcss": "3.4.14",
"tailwindcss-gradients": "^3.0.0",
"tinacms": "^2.2.8",
"tinacms": "2.2.8",
"typescript": "^5.6.3",
"usehooks-ts": "^3.1.0",
"xss": "^1.0.15",
Expand Down
3 changes: 2 additions & 1 deletion pages/api/add-contact-to-newsletters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default async function handler(
if (error instanceof CustomError) {
appInsight.defaultClient?.trackException({
exception: new Error(error.message),

properties: {
Method: `${PowerAutomate_Endpoint.NEWSLETTERS} - ${error.method}`,
RequestBody: error.requestBody,
Expand All @@ -49,7 +50,7 @@ export default async function handler(
RequestBody: req.body,
Status: error.response.status,
},
severity: appInsight.Contracts.SeverityLevel.Error,
severity: appInsight.KnownSeverityLevel.Error,
});
res
.status(error.response.status)
Expand Down
4 changes: 2 additions & 2 deletions pages/api/create-lead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function handler(
JSON.stringify(createLeadFlow.data),
createLeadFlow.status,
JSON.stringify(req.body),
appInsight.Contracts.SeverityLevel.Critical,
appInsight.KnownSeverityLevel.Critical,
STAGE.PA_FLOW
);
}
Expand All @@ -63,7 +63,7 @@ export default async function handler(
JSON.stringify(recaptchaValidation.data),
recaptchaValidation.status,
JSON.stringify(req.body),
appInsight.Contracts.SeverityLevel.Error,
appInsight.KnownSeverityLevel.Error,
STAGE.GOOGLE_RECAPTCHA
);
}
Expand Down
2 changes: 1 addition & 1 deletion pages/api/get-megamenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default async function handler(
Request: "GET /api/get-megamenu",
Status: 500,
},
severity: appInsights.Contracts.SeverityLevel.Error,
severity: appInsights.KnownSeverityLevel.Error,
});

console.error(err);
Expand Down
2 changes: 1 addition & 1 deletion pages/api/get-tweet-embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default async function handler(
Status: 500,
},
exception: err,
severity: appInsights.Contracts.SeverityLevel.Error,
severity: appInsights.KnownSeverityLevel.Error,
});
res.status(500).json({ message: err.message });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
</td>
<td align="right" valign="middle" bgcolor="#444444" style="height:35px;font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#ffffff; font-weight:normal; line-height:14px; padding:4px 20px 5px 0;text-transform:uppercase;">
<b>November 2024 | </b>
<a href="_2024_11__Spooked%20by%20the%20WordPress%20drama%20What%20Recent%20Changes%20Mean%20for%20Your%20Website__.html" target="_blank" style="color: #fff; text-decoration:none;">View Online</a>
<a href="https://ssw.com.au/images/newsletter-uploads/2024/_2024_11__Spooked%20by%20the%20WordPress%20drama%20What%20Recent%20Changes%20Mean%20for%20Your%20Website__.html" target="_blank" style="color: #fff; text-decoration:none;">View Online</a>
</td>
<!-- END EDIT HERE -->
</tr>
Expand Down Expand Up @@ -287,7 +287,7 @@
<h2 class="Intro_Title" style="font-weight: bold;">Spooked by the WordPress drama What Recent Changes Mean for Your Website 👻</h2>
<p>I’ve just come back from the USA, where I experienced my first real Halloween and USA election. Just about everyone dresses up, and the whole street is decorated for the spooky season!</p>
<p>WordPress is the most popular website-making platform, powering nearly half (43%) of the web in 2024 – this is double what it was 10 years ago in 2013 (25%). In the CMS space, WordPress is the leader taking 61% market share. </p>
<a href="https://adamcogan.com/2024/11/19/wordpress-drama/" target="_blank" style="color:#777777; text-decoration:underline #bebebe;">Read on to ind out how you can skip the WordPress drama</a></p>
<a href="https://adamcogan.com/2024/11/19/wordpress-drama/" target="_blank" style="color:#777777; text-decoration:underline #bebebe;">Read on to find out how you can skip the WorkPress drama</a></p>
</td>
</tr>
<!-- END Blog -->
Expand Down
6 changes: 4 additions & 2 deletions services/server/customError.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { KnownSeverityLevel } from "applicationinsights";

export class CustomError extends Error {
statusCode: number;
requestBody: string;
severity: number;
severity: KnownSeverityLevel;
method: string;

constructor(
message: string,
statusCode: number,
requestBody?: string,
severity?: number,
severity?: KnownSeverityLevel,
method?: string
) {
super(message);
Expand Down
4 changes: 2 additions & 2 deletions services/server/power-automate-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export const invokePowerAutomateFlow = async (
JSON.stringify(data),
axiosError.response &&
axiosError.response.status === HttpStatusCode.Conflict
? appInsight.Contracts.SeverityLevel.Information
: appInsight.Contracts.SeverityLevel.Critical,
? appInsight.KnownSeverityLevel.Information
: appInsight.KnownSeverityLevel.Error,
STAGE.PA_FLOW_AXIOS
);
} else {
Expand Down

0 comments on commit 7d9cf56

Please sign in to comment.