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

Add release notes feature, enhance error handling, and update styles #31

Merged
merged 7 commits into from
Dec 7, 2024

Conversation

JohanGrims
Copy link
Owner

@JohanGrims JohanGrims commented Dec 7, 2024

Introduce a release notes feature for displaying and editing updates. Improve error handling in the application and refine styles for better user experience.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a CreateReleaseNotes component for creating and publishing release notes.
    • Added a Help component to provide help content related to project elections.
    • Implemented a ReleaseNotes component for displaying existing release notes.
  • Enhancements

    • Improved error messages in the ErrorPage component for better user feedback.
    • Expanded navigation options in the admin panel to include "Help" and "Features."
  • Styling

    • Updated CSS for improved visual clarity in help sections and overall UI consistency.
    • Added specific styling for headings in the help section.
  • Routing

    • New routes added for the Help, ReleaseNotes, and CreateReleaseNotes components in the admin section.

Copy link

coderabbitai bot commented Dec 7, 2024

Warning

Rate limit exceeded

@JohanGrims has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 0e9ff08 and a7248bd.

Walkthrough

The changes in this pull request introduce new components and enhance existing ones within the admin section of the application. A new dependency, react-markdown, is added to package.json. New components for creating and displaying release notes and help content are implemented, alongside modifications to the ErrorPage component to improve error messaging. The navigation structure is updated to include new routes, and CSS styles are adjusted for better visual presentation.

Changes

File Change Summary
package.json Added new dependency: "react-markdown": "^9.0.1"
src/Error.jsx Enhanced error message rendering in ErrorPage component to include error?.data as a fallback.
src/admin/CreateReleaseNotes.tsx Introduced CreateReleaseNotes component for editing and publishing release notes with Firebase.
src/admin/Help.tsx Added Help component to display help content fetched from Firestore.
src/admin/ReleaseNotes.tsx Introduced ReleaseNotes component to display release notes with Firestore integration.
src/admin/index.jsx Updated Admin component to include a dropdown menu for navigation options.
src/admin/navigation/DrawerList.jsx Expanded pages array to include "help" and "features" for navigation.
src/admin/vote/Edit.jsx Modified Edit component to enhance option management and submission validation.
src/index.css Updated CSS styles for light and dark modes, including hover states for buttons and inputs.
src/main.jsx Added routes for Help, ReleaseNotes, and CreateReleaseNotes components.
src/styles.css Added new CSS rule for .help class to improve spacing for h2 elements.

Possibly related PRs

🐰 In the code we hop and play,
New features bloom, bright as day!
Release notes and help, oh what a treat,
With markdown magic, our work's complete!
So let’s celebrate, with joy we cheer,
A better app for all, let’s give a cheer! 🎉


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Dec 7, 2024

Visit the preview URL for this PR (updated for commit a7248bd):

https://waldorfwahlen--pr31-feat-help-zab4wgi4.web.app

(expires Sat, 14 Dec 2024 18:11:05 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 29598eeceef3a0396a20fa770c02232c60673862

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Outside diff range and nitpick comments (7)
src/admin/CreateReleaseNotes.tsx (1)

27-34: Consider adding validation for content length

The text field lacks input validation. Consider adding character limits or validation to prevent extremely large documents that might impact performance.

Add maxLength validation:

 <mdui-text-field
   variant="outlined"
   autosize
   min-rows={15}
+  maxLength={10000}
   label="Inhalt"
   value={content}
+  helperText={`${content.length}/10000 Zeichen`}
   onInput={(e) => setContent((e.target as HTMLInputElement).value)}
 ></mdui-text-field>
src/styles.css (1)

360-362: Consider avoiding !important flag

While the margin adjustment for help headings is reasonable, using !important should be avoided as it breaks CSS specificity cascade. Consider either:

  1. Increasing selector specificity
  2. Restructuring CSS to avoid specificity conflicts
-.help > h2{
-  margin-bottom: 10px !important;
-}
+.mdui-prose .help > h2 {
+  margin-bottom: 10px;
+}
src/admin/Help.tsx (2)

15-55: Externalize help content

The help content is currently hardcoded in the component. Consider moving it to a separate markdown file or Firestore document for easier maintenance and localization.

This would also allow for:

  • Easier content updates without code changes
  • Potential multi-language support
  • Better separation of concerns

13-14: Add ARIA landmarks for better accessibility

Consider adding proper ARIA landmarks to improve accessibility.

-    <div className="mdui-prose">
-      <h1>Hilfe & Kontakt</h1>
+    <main className="mdui-prose" role="main">
+      <h1 aria-label="Hilfe und Kontakt">Hilfe & Kontakt</h1>
src/admin/navigation/DrawerList.jsx (1)

151-151: Performance improvement: Added missing key props

Adding key props to mdui-tooltip components improves React's reconciliation process and eliminates potential warning messages.

Also applies to: 191-191, 231-231

src/admin/vote/Edit.jsx (2)

Line range hint 439-449: Enhance error handling in the loader function

While the debugging log is helpful, the error handling could be improved to provide better user feedback.

Consider this improvement:

    console.log("Loaded options:", optionData);

    return {
      vote: voteData,
      options: optionData,
    };
  } catch (error) {
    console.error("Failed to load vote:", error);
-   throw error;
+   throw new Error(`Failed to load vote: ${error.message}`);
  }

Line range hint 1-449: Consider implementing loading state feedback

The component handles loading state internally but doesn't show a loading indicator during data fetching.

Consider adding a loading indicator while the data is being fetched to improve user experience.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c75fc5d and ddd7508.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • package.json (1 hunks)
  • src/Error.jsx (1 hunks)
  • src/admin/CreateReleaseNotes.tsx (1 hunks)
  • src/admin/Help.tsx (1 hunks)
  • src/admin/ReleaseNotes.tsx (1 hunks)
  • src/admin/index.jsx (3 hunks)
  • src/admin/navigation/DrawerList.jsx (5 hunks)
  • src/admin/vote/Edit.jsx (1 hunks)
  • src/index.css (1 hunks)
  • src/main.jsx (2 hunks)
  • src/styles.css (1 hunks)
🔇 Additional comments (7)
package.json (1)

33-33: Verify react-markdown version compatibility and security.

The react-markdown package is being added with version ^9.0.1. Let's verify its compatibility and check for any known vulnerabilities.

✅ Verification successful

Let me gather more information about the dependencies and peer dependencies to ensure full compatibility.


Let me try one more search to find any usage of react-markdown with a different command:


react-markdown v9.0.1 is compatible and secure

The verification shows:

  • Compatible with React 18.2.0 (current project version)
  • No known security vulnerabilities reported
  • Already in use in multiple files (ReleaseNotes.tsx, CreateReleaseNotes.tsx, Help.tsx)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for compatibility issues and security vulnerabilities

# Check if the version is compatible with the React version
REACT_VERSION=$(node -p "require('./package.json').dependencies.react")
echo "React version: $REACT_VERSION"

# Check for known vulnerabilities in react-markdown
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: NPM, package: "react-markdown") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}'

Length of output: 492


Script:

#!/bin/bash
# Check package.json for dependencies and peer dependencies
cat package.json

# Check if there are any existing uses of react-markdown in the codebase
rg -l "react-markdown" --type js --type jsx --type ts --type tsx

Length of output: 1552


Script:

#!/bin/bash
# Search for react-markdown imports or usage in all relevant files
fd -e js -e jsx -e ts -e tsx -x grep -l "react-markdown" {} \;

# Check if this is a new addition by looking at git changes
git diff origin/main package.json | grep "react-markdown"

Length of output: 400

src/index.css (1)

135-135: LGTM!

The CSS changes look good and maintain consistency with the existing styling patterns.

src/admin/index.jsx (1)

73-95: Verify dropdown positioning

Ensure the dropdown menu is properly positioned and doesn't get cut off on smaller screens.

Let's check for similar dropdown implementations and potential positioning issues:

✅ Verification successful

The dropdown menu positioning should work correctly

Based on the codebase analysis:

  1. The dropdown is implemented using mdui-dropdown component which handles its own positioning
  2. The menu is properly structured with mdui-menu and mdui-menu-item components
  3. The application has comprehensive responsive design handling with multiple breakpoints (@media queries)
  4. The viewport meta tag is correctly set for proper mobile scaling
  5. No positioning issues are reported in similar dropdown implementations in the codebase

The component follows MDUI's standard implementation pattern and the codebase shows proper responsive design practices, suggesting the dropdown positioning will work correctly across different screen sizes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other dropdown implementations to verify consistency
rg -A 3 "mdui-dropdown" --type tsx --type jsx

# Look for any existing positioning fixes
rg "position.*fixed|absolute" --type css

Length of output: 116


Script:

#!/bin/bash
# Search for dropdown implementations with correct file extensions
rg -A 3 "mdui-dropdown" .

# Look for any positioning styles in all relevant files
rg "position:" .

# Search for any CSS/style related files
fd -e css -e scss -e less

Length of output: 933


Script:

#!/bin/bash
# Check content of CSS files for any dropdown-related styles
cat src/App.css src/admin/index.css src/index.css src/styles.css

# Check for any mdui-menu related styles or positioning
rg -A 3 "mdui-menu" .

# Look for any viewport/responsive related code
rg "media|@media|viewport" .

Length of output: 12348

src/main.jsx (2)

18-23: LGTM: Component imports are properly organized

The new components for release notes and help features are imported correctly.


97-111: Verify shared loader function between CreateReleaseNotes and ReleaseNotes

While the route structure is well-organized, both CreateReleaseNotes and ReleaseNotes components share the same loader function. This might need verification to ensure the loader handles both view and edit scenarios appropriately.

✅ Verification successful

Shared loader function is appropriate for both view and edit scenarios

The loader implementation in ReleaseNotes.tsx simply fetches the release notes content from Firestore, which is exactly what both components need:

  • ReleaseNotes component displays the content using Markdown
  • CreateReleaseNotes component uses the same content as initial state for editing (useState(releaseNotes.content))

Since both components require the same data, sharing the loader is the correct approach and works as intended.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if ReleaseNotes loader handles both view and edit scenarios
ast-grep --pattern 'loader = async function loader() {
  $$$
}'

Length of output: 65


Script:

#!/bin/bash
# Let's try a different pattern to find the loader implementation
ast-grep --pattern 'static loader'

# Also search for ReleaseNotes class/component definition
ast-grep --pattern 'class ReleaseNotes'

# And search for any loader-related code in ReleaseNotes files
rg -l "ReleaseNotes" | xargs rg "loader" -A 5

Length of output: 4437


Script:

#!/bin/bash
# Let's check the CreateReleaseNotes component implementation
rg -l "CreateReleaseNotes" | xargs rg "CreateReleaseNotes" -A 5

# And get the content of ReleaseNotes.tsx to understand the loader implementation better
cat src/admin/ReleaseNotes.tsx

Length of output: 1829

src/admin/navigation/DrawerList.jsx (2)

9-9: LGTM: Navigation routes updated correctly

The addition of "help" and "features" to the pages array properly integrates the new routes into the navigation system.


262-286: LGTM: New navigation items well implemented

The new navigation items for features and help are well-structured with:

  • Appropriate icons ("tips_and_updates" and "support")
  • Informative tooltips
  • Consistent German translations
  • Proper navigation integration

Comment on lines +14 to +15
<h1>Neuigkeiten 🎉</h1>
<Markdown className="help">{releaseNotes.content}</Markdown>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Consider sanitizing markdown content for security.

Raw markdown rendering could potentially expose XSS vulnerabilities.

- <Markdown className="help">{releaseNotes.content}</Markdown>
+ <Markdown 
+   className="help"
+   components={{
+     // Disable HTML in markdown
+     a: ({node, ...props}) => <a {...props} target="_blank" rel="noopener noreferrer"/>,
+     // Add more component overrides as needed
+   }}
+ >
+   {releaseNotes.content}
+ </Markdown>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<h1>Neuigkeiten 🎉</h1>
<Markdown className="help">{releaseNotes.content}</Markdown>
<h1>Neuigkeiten 🎉</h1>
<Markdown
className="help"
components={{
// Disable HTML in markdown
a: ({node, ...props}) => <a {...props} target="_blank" rel="noopener noreferrer"/>,
// Add more component overrides as needed
}}
>
{releaseNotes.content}
</Markdown>

Comment on lines +9 to +11
const { releaseNotes } = useLoaderData() as {
releaseNotes: { content: string };
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add error handling for missing or malformed data.

The type assertion assumes the loader will always return valid data. Consider adding runtime validation.

- const { releaseNotes } = useLoaderData() as {
-   releaseNotes: { content: string };
- };
+ const data = useLoaderData();
+ if (!data || typeof data !== 'object' || !('releaseNotes' in data) || 
+     !data.releaseNotes?.content || typeof data.releaseNotes.content !== 'string') {
+   throw new Error('Invalid release notes data');
+ }
+ const { releaseNotes } = data as { releaseNotes: { content: string } };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { releaseNotes } = useLoaderData() as {
releaseNotes: { content: string };
};
const data = useLoaderData();
if (!data || typeof data !== 'object' || !('releaseNotes' in data) ||
!data.releaseNotes?.content || typeof data.releaseNotes.content !== 'string') {
throw new Error('Invalid release notes data');
}
const { releaseNotes } = data as { releaseNotes: { content: string } };

src/admin/ReleaseNotes.tsx Outdated Show resolved Hide resolved
@@ -8,7 +8,7 @@ export default function ErrorPage() {
return (
<mdui-dialog open headline={`Fehler ${error?.status || "400"}`}>
<div className="mdui-prose">
<p>{error?.statusText || "Unknown Error Message"}</p>
<p>{error?.statusText || error?.data || "Unknown Error Message"}</p>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Consider sanitizing error messages before display.

Directly displaying error.data could potentially expose sensitive information or lead to XSS vulnerabilities.

- <p>{error?.statusText || error?.data || "Unknown Error Message"}</p>
+ <p>{
+   (error?.statusText || 
+    (typeof error?.data === 'string' ? error.data.substring(0, 100) : null) || 
+    "Unknown Error Message")
+   .replace(/[<>]/g, '') // Basic sanitization
+ }</p>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p>{error?.statusText || error?.data || "Unknown Error Message"}</p>
<p>{
(error?.statusText ||
(typeof error?.data === 'string' ? error.data.substring(0, 100) : null) ||
"Unknown Error Message")
.replace(/[<>]/g, '') // Basic sanitization
}</p>

src/admin/CreateReleaseNotes.tsx Outdated Show resolved Hide resolved
Comment on lines 14 to 18
async function publishReleaseNotes() {
setDoc(doc(db, "docs", "release-notes"), { content }).then(() => {
snackbar({ message: "Gespeichert!" });
});
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add error handling for Firebase operations

The publishReleaseNotes function lacks error handling for the Firebase operation. Failed operations could leave users unaware of issues.

Consider implementing proper error handling:

 async function publishReleaseNotes() {
-  setDoc(doc(db, "docs", "release-notes"), { content }).then(() => {
-    snackbar({ message: "Gespeichert!" });
-  });
+  try {
+    await setDoc(doc(db, "docs", "release-notes"), { content });
+    snackbar({ message: "Gespeichert!" });
+  } catch (error) {
+    console.error('Failed to save release notes:', error);
+    snackbar({ 
+      message: "Fehler beim Speichern der Release Notes",
+      style: { color: 'red' }
+    });
+  }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
async function publishReleaseNotes() {
setDoc(doc(db, "docs", "release-notes"), { content }).then(() => {
snackbar({ message: "Gespeichert!" });
});
}
async function publishReleaseNotes() {
try {
await setDoc(doc(db, "docs", "release-notes"), { content });
snackbar({ message: "Gespeichert!" });
} catch (error) {
console.error('Failed to save release notes:', error);
snackbar({
message: "Fehler beim Speichern der Release Notes",
style: { color: 'red' }
});
}
}

src/admin/index.jsx Outdated Show resolved Hide resolved
src/admin/index.jsx Outdated Show resolved Hide resolved
Comment on lines +8 to +10
const { helpContent } = useLoaderData() as {
helpContent: { content: string };
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling for loader data

The type assertion assumes the loader data will always be available. Consider adding proper error handling.

-  const { helpContent } = useLoaderData() as {
-    helpContent: { content: string };
-  };
+  const data = useLoaderData();
+  if (!data || !('helpContent' in data)) {
+    return <div>Error: Could not load help content</div>;
+  }
+  const { helpContent } = data as {
+    helpContent: { content: string };
+  };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { helpContent } = useLoaderData() as {
helpContent: { content: string };
};
const data = useLoaderData();
if (!data || !('helpContent' in data)) {
return <div>Error: Could not load help content</div>;
}
const { helpContent } = data as {
helpContent: { content: string };
};

Comment on lines +60 to +63
Help.loader = async function loader() {
const helpContent = await getDoc(doc(db, "docs", "help")); // Get contact information securely from Firestore (only accessible to admins)
return { helpContent: helpContent.data() };
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance error handling in loader function

The loader function should handle potential Firestore errors and document not found scenarios.

 Help.loader = async function loader() {
-  const helpContent = await getDoc(doc(db, "docs", "help"));
-  return { helpContent: helpContent.data() };
+  try {
+    const helpContent = await getDoc(doc(db, "docs", "help"));
+    if (!helpContent.exists()) {
+      throw new Error('Help content not found');
+    }
+    return { helpContent: helpContent.data() };
+  } catch (error) {
+    console.error('Failed to load help content:', error);
+    throw error;
+  }
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Help.loader = async function loader() {
const helpContent = await getDoc(doc(db, "docs", "help")); // Get contact information securely from Firestore (only accessible to admins)
return { helpContent: helpContent.data() };
};
Help.loader = async function loader() {
try {
const helpContent = await getDoc(doc(db, "docs", "help"));
if (!helpContent.exists()) {
throw new Error('Help content not found');
}
return { helpContent: helpContent.data() };
} catch (error) {
console.error('Failed to load help content:', error);
throw error;
}
};

JohanGrims and others added 6 commits December 7, 2024 19:01
@JohanGrims JohanGrims merged commit ce7636f into master Dec 7, 2024
3 checks passed
@JohanGrims JohanGrims deleted the feat/help branch December 7, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant