Skip to content

Commit

Permalink
Supporting markdown newlines and centered personal image
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkyebrahim2514 committed Dec 5, 2024
1 parent 6b48893 commit 0a21272
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 8 additions & 0 deletions react-frontend/src/components/HTMLMarkdown/customPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ export const configureTextDirection = () => {
return null;
}
])
findAndReplace(node as Nodes, [
/\[newline\]/,
(fullText: any) => {
return {
type: 'break'
}
}
])
}
})
}
Expand Down
5 changes: 2 additions & 3 deletions react-frontend/src/containers/About/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import Loader from '../../components/Loader';

function About() {
const [aboutPage, setAboutPage] = useState<SanityAboutPage | null>(null);
const isMediumScreen = useMediaQuery({ query: '(max-width: 1124px)' });
const containerStyle = useMemo((): CSSProperties => ({
display: "flex",
flexDirection: isMediumScreen ? "column-reverse" : "row",
flexDirection: "column-reverse",
justifyContent: "space-between",
alignItems: "center",
gap: "2rem",
}), [isMediumScreen]);
}), []);

useEffect(() => {
getAboutPage().then((result) => {
Expand Down

0 comments on commit 0a21272

Please sign in to comment.