-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
website / Fix broken links, slow loading, and prod errors (#5932)
The code is in a bad state, this is just fixing it but not improving the structure
- Loading branch information
1 parent
6b1548e
commit dbaa787
Showing
15 changed files
with
64 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/twenty-website/src/app/_components/playground/rest-api-wrapper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React, { useEffect } from 'react'; | ||
// @ts-expect-error Migration loader as text not passing warnings | ||
import { API } from '@stoplight/elements'; | ||
|
||
// @ts-expect-error Migration loader as text not passing warnings | ||
import spotlightTheme from '!css-loader!@stoplight/elements/styles.min.css'; | ||
|
||
export const RestApiWrapper = ({ openApiJson }: { openApiJson: any }) => { | ||
// We load spotlightTheme style using useEffect as it breaks remaining docs style | ||
useEffect(() => { | ||
const styleElement = document.createElement('style'); | ||
styleElement.innerHTML = spotlightTheme.toString(); | ||
document.head.append(styleElement); | ||
|
||
return () => styleElement.remove(); | ||
}, []); | ||
|
||
return ( | ||
<div | ||
style={{ | ||
height: 'calc(100vh - var(--ifm-navbar-height) - 45px)', | ||
width: '100%', | ||
overflow: 'auto', | ||
}} | ||
> | ||
<API apiDescriptionDocument={JSON.stringify(openApiJson)} router="hash" /> | ||
</div> | ||
); | ||
}; |
4 changes: 1 addition & 3 deletions
4
packages/twenty-website/src/app/_components/ui/layout/PostImage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import Image from 'next/image'; | ||
|
||
export const PostImage = ({ | ||
sources, | ||
style, | ||
}: { | ||
sources: { light: string; dark: string }; | ||
style?: React.CSSProperties; | ||
}) => { | ||
return <Image src={sources.light} style={style} alt={sources.light} />; | ||
return <img src={sources.light} style={style} alt={sources.light} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 9 additions & 26 deletions
35
packages/twenty-website/src/app/developers/rest-api/metadata/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters