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

Bump next from 12.2.0 to 13.0.5 #945

Merged
merged 8 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
22 changes: 11 additions & 11 deletions app/auth/components/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export const LoginForm = (props: LoginFormProps) => {
<div className="flex min-h-screen flex-col justify-center bg-gray-100 py-12 text-gray-900 dark:bg-gray-900 dark:text-white sm:px-6 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<Link href={Routes.Home()}>
<a>
<ResearchEqualsLogo />
</a>
<ResearchEqualsLogo />
</Link>
<h1 className="mt-6 text-center text-3xl font-extrabold ">Log in to ResearchEquals</h1>
<div className="my-8 mx-auto rounded bg-white py-4 px-6 shadow dark:bg-gray-800">
Expand Down Expand Up @@ -87,10 +85,11 @@ export const LoginForm = (props: LoginFormProps) => {
</div>
</div>
<div className="my-4 text-center text-sm font-medium text-indigo-600 dark:text-gray-200">
<Link href={Routes.ForgotPasswordPage()}>
<a className="underline focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-0">
Forgot your password?
</a>
<Link
href={Routes.ForgotPasswordPage()}
className="underline focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-0"
>
Forgot your password?
</Link>
</div>
<button
Expand All @@ -102,10 +101,11 @@ export const LoginForm = (props: LoginFormProps) => {
</form>
<div className="mt-4 text-center text-sm font-medium text-gray-900 dark:text-white">
Do not have an account?{" "}
<Link href={Routes.SignupPage()}>
<a className="text-indigo-600 underline focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-0 dark:text-gray-200">
Sign up
</a>
<Link
href={Routes.SignupPage()}
className="text-indigo-600 underline focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-0 dark:text-gray-200"
>
Sign up
</Link>
</div>
</div>
Expand Down
12 changes: 5 additions & 7 deletions app/collections/components/AdminEditors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ const EditorCard = ({ editor, isAdmin, isSelf, refetchFn }) => {
<div className={`flex ${editor.isActive ? "" : "opacity-50"} my-2`}>
<img src={editor.workspace.avatar} className="mx-2 h-12 w-12 rounded-full" />
<div className="inline-block flex-grow">
<Link href={Routes.HandlePage({ handle: editor.workspace.handle })}>
<a target="_blank">
<p className="line-clamp-1">
{editor.workspace.firstName} {editor.workspace.lastName}
</p>
<p className="text-sm">@{editor.workspace.handle}</p>
</a>
<Link href={Routes.HandlePage({ handle: editor.workspace.handle })} target="_blank">
<p className="line-clamp-1">
{editor.workspace.firstName} {editor.workspace.lastName}
</p>
<p className="text-sm">@{editor.workspace.handle}</p>
</Link>
</div>
{isAdmin && (
Expand Down
10 changes: 6 additions & 4 deletions app/collections/components/AdminSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ const AdminSubmission = ({ submission, editorIdSelf, refetchFn }) => {
{submission.accepted === null && (
<>
<div className="my-8">
<Link href={`https://doi.org/${submission.module.prefix}/${submission.module.suffix}`}>
<a className="text-lg" target="_blank">
{submission.module.title}
</a>
<Link
href={`https://doi.org/${submission.module.prefix}/${submission.module.suffix}`}
className="text-lg"
target="_blank"
>
{submission.module.title}
</Link>
{/* doi */}
<div className="grid grid-cols-2">
Expand Down
18 changes: 10 additions & 8 deletions app/collections/components/AdminWorkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ const WorkMetadata = ({ submission, editorIsAdmin, refetchFn }) => {
{submission.submittedBy && (
<p className="text-xs">
Submitted by{" "}
<Link href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}>
<a target="_blank">
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</a>
<Link
href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}
target="_blank"
>
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</Link>
</p>
)}
Expand Down Expand Up @@ -147,10 +148,11 @@ const WorkComment = ({ submission, index, editorIdSelf, refetchFn, editorIsAdmin
/>
<div className="mx-1 inline-block h-full align-middle">
<span className="inline-block h-full align-middle"></span>
<Link href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}>
<a target="_blank">
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</a>
<Link
href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}
target="_blank"
>
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</Link>
</div>
</span>
Expand Down
15 changes: 7 additions & 8 deletions app/collections/components/DoiCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ const Doi = ({ collection }) => {
return (
<>
{collection.public ? (
<Link href={`https://doi.org/${process.env.DOI_PREFIX}/${collection!.suffix}`}>
<a
className={`m-1 inline-flex items-center rounded-full bg-purple-100 px-3 py-0.5 text-sm font-medium text-purple-800 ${
!collection.public && "opacity-75"
}`}
>
{`${process.env.DOI_PREFIX}/${collection!.suffix}`}
</a>
<Link
href={`https://doi.org/${process.env.DOI_PREFIX}/${collection!.suffix}`}
className={`m-1 inline-flex items-center rounded-full bg-purple-100 px-3 py-0.5 text-sm font-medium text-purple-800 ${
!collection.public && "opacity-75"
}`}
>
{`${process.env.DOI_PREFIX}/${collection!.suffix}`}
</Link>
) : (
<a
Expand Down
11 changes: 5 additions & 6 deletions app/collections/components/DoiSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import Link from "next/link"
const Doi = ({ submission }) => {
return (
<>
<Link href={`https://doi.org/${submission.module.prefix}/${submission.module.suffix}`}>
<a
className={`my-1 inline-flex items-center rounded-full bg-amber-100 px-3 py-0.5 text-sm font-medium text-amber-800 `}
>
{`${submission.module.prefix}/${submission.module.suffix}`}
</a>
<Link
href={`https://doi.org/${submission.module.prefix}/${submission.module.suffix}`}
className={`my-1 inline-flex items-center rounded-full bg-amber-100 px-3 py-0.5 text-sm font-medium text-amber-800 `}
>
{`${submission.module.prefix}/${submission.module.suffix}`}
</Link>
</>
)
Expand Down
12 changes: 5 additions & 7 deletions app/collections/components/ViewEditors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ const EditorCard = ({ editor }) => {
<div className={`flex ${editor.isActive ? "" : "opacity-50"} my-2`}>
<img src={editor.workspace.avatar} className="mr-2 h-12 w-12 rounded-full" />
<div className="inline-block flex-grow">
<Link href={Routes.HandlePage({ handle: editor.workspace.handle })}>
<a target="_blank">
<p className="line-clamp-1">
{editor.workspace.firstName} {editor.workspace.lastName}
</p>
<p className="text-sm">@{editor.workspace.handle}</p>
</a>
<Link href={Routes.HandlePage({ handle: editor.workspace.handle })} target="_blank">
<p className="line-clamp-1">
{editor.workspace.firstName} {editor.workspace.lastName}
</p>
<p className="text-sm">@{editor.workspace.handle}</p>
</Link>
</div>
</div>
Expand Down
18 changes: 10 additions & 8 deletions app/collections/components/ViewWorkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ const WorkMetadata = ({ submission }) => {
{submission.submittedBy && (
<p className="text-xs">
Submitted by{" "}
<Link href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}>
<a target="_blank">
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</a>
<Link
href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}
target="_blank"
>
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</Link>
</p>
)}
Expand All @@ -71,10 +72,11 @@ const WorkComment = ({ submission, index }) => {
/>
<div className="mx-1 inline-block h-full align-middle">
<span className="inline-block h-full align-middle"></span>
<Link href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}>
<a target="_blank">
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</a>
<Link
href={Routes.HandlePage({ handle: submission.editor.workspace.handle })}
target="_blank"
>
{submission.editor!.workspace.firstName} {submission.editor!.workspace.lastName}
</Link>
</div>
</span>
Expand Down
14 changes: 6 additions & 8 deletions app/core/components/AuthorList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ function AuthorList({
<ChevronDown size={32} className="h-5 w-5 text-gray-400" />
</button>
</div>
<Link href={Routes.HandlePage({ handle: author.workspace.handle })}>
<a target="_blank">
<img
src={author!.workspace!.avatar}
alt={`Avatar of ${author!.workspace!.handle}`}
className="inline-block h-10 h-full w-10 rounded-full align-middle transition ease-in-out hover:scale-110"
/>
</a>
<Link href={Routes.HandlePage({ handle: author.workspace.handle })} target="_blank">
<img
src={author!.workspace!.avatar}
alt={`Avatar of ${author!.workspace!.handle}`}
className="inline-block h-10 h-full w-10 rounded-full align-middle transition ease-in-out hover:scale-110"
/>
</Link>
</div>
<div className="flex-grow">
Expand Down
7 changes: 4 additions & 3 deletions app/core/components/DefaultNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ const DefaultNode = ({
? Routes.ModulePage({ suffix: data?.module.suffix })
: `https://doi.org/${data?.module.prefix}/${data?.module.suffix}`
}
target="_blank"
rel="noreferrer"
className="ml-2 inline-block align-middle"
>
<a target="_blank" rel="noreferrer" className="ml-2 inline-block align-middle">
<Launch size={16} />
</a>
<Launch size={16} />
</Link>
</div>
</div>
Expand Down
139 changes: 71 additions & 68 deletions app/core/components/Footer.tsx

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions app/core/components/InputNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ const InputNode = ({ data, isConnectable, sourcePosition = Position.Bottom }: No
? Routes.ModulePage({ suffix: data?.module.suffix })
: `https://doi.org/${data?.module.prefix}/${data?.module.suffix}`
}
target="_blank"
rel="noreferrer"
className="ml-2 inline-block align-middle"
>
<a target="_blank" rel="noreferrer" className="ml-2 inline-block align-middle">
<Launch size={16} />
</a>
<Launch size={16} />
</Link>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/core/components/InvitationNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import moment from "moment"
const InvitationNotification = ({ invited }) => {
return (
<>
<Link href={`/invitations?suffix=${invited.suffix}`}>
<Link href={`/invitations?suffix=${invited.suffix}`} legacyBehavior>
<li className="cursor-pointer p-2">
<p className="text-xs leading-4 text-gray-400">{moment(invited.updatedAt).fromNow()}</p>
<p className="mt-2 mb-1 text-sm font-bold leading-4 text-gray-900 dark:text-gray-200">
Expand Down
24 changes: 11 additions & 13 deletions app/core/components/ModuleBoxFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ const ModuleBoxFeed = ({ modules, fetchNextPage, hasNextPage, isFetchingNextPage
className="my-4 grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4"
>
{page.modules.map((module) => (
<Link key={module.suffix} href={Routes.ModulePage({ suffix: module.suffix })}>
<a
className="module flex cursor-pointer flex-col p-4 text-white"
style={{ backgroundColor: module.displayColor }}
>
<h2 className="mb-2 flex-grow text-base font-normal leading-5">
{module.title}
</h2>
<span className="flex w-full">
<span className="flex-grow align-text-bottom text-gray-300"></span>
<AuthorAvatarsNew authors={module.authors} size="h-6 w-6" toDisplay={4} />
</span>
</a>
<Link
key={module.suffix}
href={Routes.ModulePage({ suffix: module.suffix })}
className="module flex cursor-pointer flex-col p-4 text-white"
style={{ backgroundColor: module.displayColor }}
>
<h2 className="mb-2 flex-grow text-base font-normal leading-5">{module.title}</h2>
<span className="flex w-full">
<span className="flex-grow align-text-bottom text-gray-300"></span>
<AuthorAvatarsNew authors={module.authors} size="h-6 w-6" toDisplay={4} />
</span>
</Link>
))}
</div>
Expand Down
4 changes: 1 addition & 3 deletions app/core/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const Navbar = ({
<div className="flex md:absolute md:inset-y-0 md:left-0 lg:static xl:col-span-2">
<div className="my-2 flex shrink-0 items-center">
<Link href={Routes.Home()}>
<a>
<ResearchEqualsLogo />
</a>
<ResearchEqualsLogo />
</Link>
</div>
</div>
Expand Down
20 changes: 10 additions & 10 deletions app/core/components/NavbarDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,44 @@ const DropdownContents = ({
buttonStyle="w-full py-2 bg-indigo-50 dark:bg-gray-800 text-indigo-700 dark:text-gray-200 border border-transparent text-sm leading-5 font-normal rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:border dark:border-gray-400 dark:hover:bg-gray-700"
refetchFn={refetchFn}
/>
<Link href={Routes.Browse()}>
<Link href={Routes.Browse()} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
Browse
</button>
</Link>
<Link href={Routes.Graph()}>
<Link href={Routes.Graph()} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
Map
</button>
</Link>
<Link href={Routes.CollectionsPage()}>
<Link href={Routes.CollectionsPage()} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
Collections
</button>
</Link>
<Link href={Routes.Dashboard()}>
<Link href={Routes.Dashboard()} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
Dashboard
</button>
</Link>

<Link href={Routes.DraftsPage()}>
<Link href={Routes.DraftsPage()} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
Drafts
<span className="ml-3 inline-block rounded-full bg-gray-100 py-0.5 px-2.5 text-xs font-medium text-gray-800 group-hover:bg-indigo-100 group-hover:text-indigo-800 dark:border dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:group-hover:bg-gray-700 dark:group-hover:text-gray-200">
{drafts.length}
</span>
</button>
</Link>
<Link href={Routes.InvitationsPage()}>
<Link href={Routes.InvitationsPage()} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
Invitations
<span className="ml-3 inline-block rounded-full bg-gray-100 py-0.5 px-2.5 text-xs font-medium text-gray-800 group-hover:bg-indigo-100 group-hover:text-indigo-800 dark:border dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:group-hover:bg-gray-700 dark:group-hover:text-gray-200">
{invitedModules.length}
</span>
</button>
</Link>
<Link href={Routes.HandlePage({ handle: currentWorkspace.handle })}>
<Link href={Routes.HandlePage({ handle: currentWorkspace.handle })} legacyBehavior>
<button className="group block w-full rounded-md px-2 py-2 text-left text-base font-normal leading-5 text-gray-900 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-800">
My Modules
</button>
Expand All @@ -102,7 +102,7 @@ const DropdownContents = ({
</div>
<DropdownNotificationModal invitedModules={invitedModules} />
</li>
<Link href="#">
<Link href="#" legacyBehavior>
<SettingsModal
styling="w-full text-left block rounded-md px-2 py-2 text-gray-500 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 text-base leading-5 font-normal"
button="Settings"
Expand All @@ -126,12 +126,12 @@ const DropdownContents = ({
return (
<>
<div className="px-5 pb-2">
<Link href={Routes.LoginPage()}>
<Link href={Routes.LoginPage()} legacyBehavior>
<button className="block w-full rounded-md border-0 bg-indigo-100 py-2 px-0 text-sm font-normal leading-5 text-indigo-700 hover:bg-indigo-200 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:border dark:border-gray-600 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700">
Log in
</button>
</Link>
<Link href={Routes.SignupPage()}>
<Link href={Routes.SignupPage()} legacyBehavior>
<button className="my-1 block w-full rounded-md bg-indigo-600 py-2 px-0 text-sm font-normal leading-5 text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
Create account
</button>
Expand Down
Loading