-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from complexdatacollective/feature/example-use…
…-optimistic Next 14
- Loading branch information
Showing
47 changed files
with
1,123 additions
and
1,046 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
23 changes: 0 additions & 23 deletions
23
app/(dashboard)/dashboard/_components/AnonymousRecruitment.tsx
This file was deleted.
Oops, something went wrong.
67 changes: 0 additions & 67 deletions
67
app/(dashboard)/dashboard/_components/AnonymousRecruitmentSwitch.tsx
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ export function NavigationBar() { | |
const pathname = usePathname(); | ||
|
||
return ( | ||
<nav className="flex justify-between p-10"> | ||
<nav className="flex justify-between bg-[#e5e7eb] px-4 py-2"> | ||
<Link href="/" className="mr-6 flex items-center space-x-2"> | ||
<Image | ||
src="/images/[email protected]" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
import { ProtocolsTable } from '~/app/(dashboard)/dashboard/_components/ProtocolsTable/ProtocolsTable'; | ||
import { ProtocolsTable } from '../_components/ProtocolsTable/ProtocolsTable'; | ||
import { api } from '~/trpc/server'; | ||
|
||
const ProtocolsPage = async () => { | ||
try { | ||
const protocols = await api.protocol.get.all.query(undefined, { | ||
context: { | ||
revalidate: 0, | ||
}, | ||
}); | ||
return ( | ||
<div className="rounded-lg bg-white p-6"> | ||
<h2 className="mb-6 text-2xl font-bold">Protocols management view</h2> | ||
<ProtocolsTable initialData={protocols} /> | ||
</div> | ||
); | ||
} catch (error) { | ||
throw new Error('An error occurred while fetching protocols'); | ||
} | ||
const protocols = await api.protocol.get.all.query(); | ||
return ( | ||
<div className="rounded-lg bg-white p-6"> | ||
<h2 className="mb-6 text-2xl font-bold">Protocols management view</h2> | ||
<ProtocolsTable initialData={protocols} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProtocolsPage; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { motion } from 'framer-motion'; | ||
import { Loader2 } from 'lucide-react'; | ||
import type { ReactNode } from 'react'; | ||
|
||
export const StepLoadingState = () => ( | ||
<motion.div | ||
className="flex h-full min-w-[30rem] items-center justify-center" | ||
initial={{ opacity: 0 }} | ||
animate={{ opacity: 1 }} | ||
exit={{ opacity: 0 }} | ||
> | ||
<Loader2 className="h-8 w-8 animate-spin" /> | ||
</motion.div> | ||
); | ||
|
||
export const StepMotionWrapper = ({ children }: { children: ReactNode }) => { | ||
return ( | ||
<motion.div | ||
initial={{ opacity: 0 }} | ||
animate={{ opacity: 1 }} | ||
exit={{ opacity: 0 }} | ||
> | ||
{children} | ||
</motion.div> | ||
); | ||
}; |
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
Oops, something went wrong.