Skip to content
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
16 changes: 4 additions & 12 deletions frontend/app/[lang]/form/[formId]/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@

import Link from 'next/link';
import { useParams } from 'next/navigation';
import { useEffect } from 'react';
import { Alert, Button } from 'react-bootstrap';
import { Button, InlineAlert } from '@bcgov/design-system-react-components';
import { useDictionary } from '@/app/[lang]/Providers';

export default function FormIdRouteError({
error,
reset,
}: {
error: Error & { digest?: string };
Expand All @@ -28,21 +26,15 @@ export default function FormIdRouteError({
const dict = useDictionary();
const labels = dict.formioV5.formRender.segmentError;

useEffect(() => {
if (process.env.NODE_ENV !== 'production') {
console.error('[forms/[formId]/error]', error);
}
}, [error]);

return (
<div className="mt-4" role="alert">
<Alert variant="danger">{labels.title}</Alert>
<InlineAlert variant="danger">{labels.title}</InlineAlert>
<div className="d-flex flex-wrap gap-3">
<Button type="button" variant="primary" onClick={() => reset()}>
<Button type="button" variant="primary" onPress={() => reset()}>
{labels.tryAgain}
</Button>
<Link
className="text-[var(--theme-primary-blue)] underline hover:no-underline"
className="text-decoration-underline"
href={`/${locale}/forms`}
>
{labels.backToList}
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default async function RootLayout({
const showHome = isFeatureAllowed(FEATURE_CODES.MARKETING);

return (
<DictionaryProvider dictionary={dictionary}>
<DictionaryProvider dictionary={dictionary} locale={locale}>
<Header headerNavItems={headerNavItems} overlayNavItems={overlayNavItems} />
<div className="d-flex w-100">
<aside
Expand Down
Binary file modified frontend/app/favicon.ico
100644 → 100755
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function GlobalError({
}) {
return (
<html lang="en">
<body className="antialiased">
<body>
<h1>Something went wrong</h1>
{error.digest ? <p>Reference: {error.digest}</p> : null}
<button type="button" onClick={() => reset()}>
Expand Down
17 changes: 0 additions & 17 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@import '@bcgov/bc-sans/css/BC_Sans.css';
@import '@bcgov/design-tokens/css/variables.css';
@import 'bootstrap/dist/css/bootstrap.min.css';
@import '@formio/js/dist/formio.full.min.css';
@import '@formio/js/dist/formio.builder.min.css';
@import '@fortawesome/fontawesome-free/css/all.min.css';

:root {
--app-bg: var(--surface-color-background-light-gray);
Expand Down Expand Up @@ -47,17 +44,3 @@ a {
border-color: var(--surface-color-border-default);
}

.bc-gov-header {
background: var(--surface-color-background-white);
border-bottom: 1px solid var(--surface-color-border-default);
}

.bc-gov-header .navbar-brand {
font-weight: 700;
color: var(--typography-color-primary);
font-size: 1rem;
}

.bc-gov-header .navbar-brand:hover {
color: var(--app-primary);
}
2 changes: 1 addition & 1 deletion frontend/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
}}
/>
</head>
<body className="antialiased">{children}</body>
<body>{children}</body>
</html>
);
}
Loading
Loading