Skip to content

Commit

Permalink
fix(app): fix frontend bugs (#457)
Browse files Browse the repository at this point in the history
* fix(app): fix frontend bugs

* refactor(app): remove null

* refactor(app): change markdown format to md

* fix(app): fix dark mode colors
  • Loading branch information
AdiPol1359 authored Dec 22, 2022
1 parent 7d19c13 commit a848b72
Show file tree
Hide file tree
Showing 6 changed files with 9,152 additions and 10,535 deletions.
3 changes: 2 additions & 1 deletion apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"rehype-prism-plus": "1.5.0",
"tailwind-merge": "1.8.0"
"tailwind-merge": "1.8.0",
"xss": "1.0.14"
},
"devDependencies": {
"@csstools/postcss-oklab-function": "1.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default function Loading() {
return (
<div className="mt-8 flex items-center justify-center" aria-label="ładowanie pytań">
<div className="h-12 w-12 animate-loader border-4 border-primary">
<div className="w-full animate-loader-inner bg-primary" />
<div className="h-12 w-12 animate-loader border-4 border-primary dark:border-neutral-200">
<div className="w-full animate-loader-inner bg-primary dark:bg-neutral-200" />
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/AdminPanel/AdminPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const AdminPanel = ({ page, technology, levels, status }: AdminPanelProps
/>
</>
) : (
<p className="mt-10 text-2xl font-bold uppercase text-primary">
<p className="mt-10 text-2xl font-bold uppercase text-primary dark:text-neutral-200">
{status === "accepted"
? "Nie znaleziono żadnego pytania"
: "Brak pytań do zaakceptowania"}
Expand Down
3 changes: 0 additions & 3 deletions apps/app/src/components/QuestionItem/QuestionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote";

import "prismjs";

// import "prismjs/themes/prism-coy.css";
import "../../styles/prism-one-light.css";

type QuestionContentProps = Readonly<{
Expand Down
5 changes: 3 additions & 2 deletions apps/app/src/lib/markdown.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import rehypePrism from "rehype-prism-plus";
import xss from "xss";
import { serialize } from "next-mdx-remote/serialize";

export const serializeSource = (source: string) =>
serialize(source, {
serialize(xss(source, { whiteList: {} }), {
mdxOptions: {
remarkPlugins: [],
rehypePlugins: [rehypePrism],
format: "md",
},
});
Loading

0 comments on commit a848b72

Please # to comment.