Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fixing missingSuspenseWithCSRBailout warnings with nextjs 15 bump #356

Merged
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
3 changes: 0 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
const nextConfig = {
reactStrictMode: true,
transpilePackages: ['@patternfly/react-core', '@patternfly/react-styles', '@patternfly/react-table', '@patternfly/react-component-groups'],
experimental: {
missingSuspenseWithCSRBailout: false,
},
};

module.exports = nextConfig;
160 changes: 81 additions & 79 deletions src/app/#/githublogin.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState, Suspense } from 'react';
import { Button } from '@patternfly/react-core/dist/dynamic/components/Button';
import { Content } from '@patternfly/react-core/dist/dynamic/components/Content';

Expand Down Expand Up @@ -71,89 +71,91 @@ const GithubLogin: React.FC = () => {
};

return (
<div className="login-page-background">
<Grid hasGutter span={12}>
<GridItem span={6} className="login-container">
<div>
<Content>
<Content component="p" className="sign-in-text">
# to your account
<Suspense>
<div className="login-page-background">
<Grid hasGutter span={12}>
<GridItem span={6} className="login-container">
<div>
<Content>
<Content component="p" className="sign-in-text">
# to your account
</Content>
</Content>
</Content>
<Content>
<Content component="p" className="description-text">
Join the novel, community based movement to <br></br>create truly open source LLMs
<Content>
<Content component="p" className="description-text">
Join the novel, community based movement to <br></br>create truly open source LLMs
</Content>
</Content>
</Content>
<div className="login-container">
<Button
variant="primary"
icon={<GithubIcon />}
iconPosition="left"
size="lg"
style={{ backgroundColor: 'black' }}
onClick={handleGitHubLogin}
>
# with GitHub
</Button>
</div>
<Content>
<Content component="p" className="urls-text">
<a href="https://github.com/instructlab/" style={{ color: 'white', textDecoration: 'underline' }} target="_blank">
GitHub
</a>{' '}
|{' '}
<a
href="https://github.com/instructlab/community/blob/main/Collaboration.md"
style={{ color: 'white', textDecoration: 'underline' }}
target="_blank"
>
Collaborate
</a>{' '}
|{' '}
<a
href="https://github.com/instructlab/community/blob/main/CODE_OF_CONDUCT.md"
style={{ color: 'white', textDecoration: 'underline' }}
target="_blank"
<div className="login-container">
<Button
variant="primary"
icon={<GithubIcon />}
iconPosition="left"
size="lg"
style={{ backgroundColor: 'black' }}
onClick={handleGitHubLogin}
>
Code Of Conduct
</a>
# with GitHub
</Button>
</div>
<Content>
<Content component="p" className="urls-text">
<a href="https://github.com/instructlab/" style={{ color: 'white', textDecoration: 'underline' }} target="_blank">
GitHub
</a>{' '}
|{' '}
<a
href="https://github.com/instructlab/community/blob/main/Collaboration.md"
style={{ color: 'white', textDecoration: 'underline' }}
target="_blank"
>
Collaborate
</a>{' '}
|{' '}
<a
href="https://github.com/instructlab/community/blob/main/CODE_OF_CONDUCT.md"
style={{ color: 'white', textDecoration: 'underline' }}
target="_blank"
>
Code Of Conduct
</a>
</Content>
<Content component="p" className="urls-text-medium">
<a href="https://www.redhat.com/en/about/terms-use" style={{ color: 'white', textDecoration: 'underline' }} target="_blank">
Terms of use
</a>{' '}
|{' '}
<a href="https://www.redhat.com/en/about/privacy-policy" style={{ color: 'white', textDecoration: 'underline' }} target="_blank">
Privacy Policy
</a>
</Content>
</Content>
<Content component="p" className="urls-text-medium">
<a href="https://www.redhat.com/en/about/terms-use" style={{ color: 'white', textDecoration: 'underline' }} target="_blank">
Terms of use
</a>{' '}
|{' '}
<a href="https://www.redhat.com/en/about/privacy-policy" style={{ color: 'white', textDecoration: 'underline' }} target="_blank">
Privacy Policy
</a>
</Content>
</Content>
</div>
</GridItem>
</Grid>
{showError && (
<div>
<Modal
variant={ModalVariant.medium}
title="Join InstructLab on GitHub"
titleIconVariant="warning"
isOpen={showError}
onClose={() => handleOnClose()}
actions={[
<Button key="confirm" variant="primary" onClick={() => sendInvite()}>
Send Invite to {githubUsername}
</Button>,
<Button key="cancel" variant="secondary" onClick={() => handleOnClose()}>
No, Thanks
</Button>
]}
>
<p>{errorMsg}</p>
</Modal>
</div>
</GridItem>
</Grid>
{showError && (
<div>
<Modal
variant={ModalVariant.medium}
title="Join InstructLab on GitHub"
titleIconVariant="warning"
isOpen={showError}
onClose={() => handleOnClose()}
actions={[
<Button key="confirm" variant="primary" onClick={() => sendInvite()}>
Send Invite to {githubUsername}
</Button>,
<Button key="cancel" variant="secondary" onClick={() => handleOnClose()}>
No, Thanks
</Button>
]}
>
<p>{errorMsg}</p>
</Modal>
</div>
)}
</div>
)}
</div>
</Suspense>
);
};

Expand Down