-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
1,098 additions
and
1,328 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Button from '@/_components/button'; | ||
import { ReactNode } from 'react'; | ||
|
||
interface LayoutProps { | ||
children: ReactNode; | ||
} | ||
|
||
const Layout = async ({ children }: LayoutProps) => ( | ||
<> | ||
<div className="my-16 flex h-8 items-center justify-between gap-8 px-4"> | ||
<h1 className="text-2xl">Inputs</h1> | ||
<Button href="/inputs/create" size="sm"> | ||
Create input | ||
</Button> | ||
</div> | ||
{children} | ||
</> | ||
); | ||
|
||
export default Layout; |
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,5 @@ | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => <Spinner className="mx-auto" />; | ||
|
||
export default Loading; |
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,30 @@ | ||
import FilterableInputLinkList from '@/(account)/inputs/_components/filterable-input-link-list'; | ||
import Empty from '@/_components/empty'; | ||
import listInputs from '@/_server/list-inputs'; | ||
import sortInputs from '@/_utilities/sort-inputs'; | ||
import { InformationCircleIcon } from '@heroicons/react/24/outline'; | ||
|
||
export const metadata = { | ||
title: 'Inputs', | ||
}; | ||
|
||
export const revalidate = 0; | ||
|
||
const Page = async () => { | ||
const { data: inputs } = await listInputs(); | ||
|
||
if (!inputs?.length) { | ||
return ( | ||
<Empty className="mx-4"> | ||
<InformationCircleIcon className="w-7" /> | ||
Inputs define the specific data points | ||
<br /> | ||
you are interested in tracking. | ||
</Empty> | ||
); | ||
} | ||
|
||
return <FilterableInputLinkList inputs={inputs.sort(sortInputs)} />; | ||
}; | ||
|
||
export default Page; |
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,14 @@ | ||
import BackButton from '@/_components/back-button'; | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => ( | ||
<> | ||
<div className="my-16 flex h-8 items-center justify-between gap-8 px-4"> | ||
<BackButton disabled /> | ||
<div className="h-6 w-32 animate-pulse rounded-sm bg-alpha-3" /> | ||
</div> | ||
<Spinner className="mx-auto" /> | ||
</> | ||
); | ||
|
||
export default Loading; |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import BackButton from '@/_components/back-button'; | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => ( | ||
<> | ||
<div className="my-16 flex h-8 items-center justify-between gap-8 px-4"> | ||
<BackButton disabled /> | ||
<div className="h-6 w-32 animate-pulse rounded-sm bg-alpha-3" /> | ||
</div> | ||
<Spinner className="mx-auto" /> | ||
</> | ||
); | ||
|
||
export default Loading; |
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 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 |
---|---|---|
|
@@ -15,7 +15,7 @@ const Layout = async ({ children }: LayoutProps) => { | |
const { count } = await countNotifications(); | ||
|
||
return ( | ||
<div className="mx-auto max-w-lg pb-16"> | ||
<div className="mx-auto max-w-lg pb-20"> | ||
<nav className="-mb-3 flex items-center justify-between gap-4 px-4 pt-8 leading-none text-fg-3"> | ||
<div className="flex flex-wrap gap-4"> | ||
<Button activeClassName="text-fg-2" href="/subjects" variant="link"> | ||
|
@@ -55,14 +55,6 @@ const Layout = async ({ children }: LayoutProps) => { | |
</div> | ||
</nav> | ||
{children} | ||
{!user?.user_metadata?.is_client && ( | ||
<p className="mt-16 flex justify-center gap-4"> | ||
<span className="text-fg-4">Questions or feedback?</span> | ||
<Button variant="link" href="mailto:[email protected]"> | ||
[email protected] | ||
</Button> | ||
</p> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
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
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,16 @@ | ||
import { ReactNode } from 'react'; | ||
|
||
interface LayoutProps { | ||
children: ReactNode; | ||
} | ||
|
||
const Layout = async ({ children }: LayoutProps) => ( | ||
<> | ||
<div className="my-16 flex h-8 items-center justify-between gap-8 px-4"> | ||
<h1 className="text-2xl">Notifications</h1> | ||
</div> | ||
{children} | ||
</> | ||
); | ||
|
||
export default Layout; |
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,5 @@ | ||
import Spinner from '@/_components/spinner'; | ||
|
||
const Loading = () => <Spinner className="mx-auto" />; | ||
|
||
export default Loading; |
Oops, something went wrong.