-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hide releases page with feature flag (#43)
- Loading branch information
1 parent
781e1db
commit de23f99
Showing
27 changed files
with
907 additions
and
62 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
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,5 +1,71 @@ | ||
import { redirect } from 'next/navigation'; | ||
import { MainContent } from '@/components'; | ||
import { config } from '@/config'; | ||
import { | ||
Accordion, | ||
AccordionContent, | ||
AccordionItem, | ||
AccordionTrigger, | ||
} from '@ds-project/components'; | ||
import Link from 'next/link'; | ||
|
||
const items = [ | ||
{ | ||
title: 'Who am I?', | ||
content: ( | ||
<p> | ||
Hello! I'm Tomás, the builder of DS Pro. I'm glad you're here. | ||
<br /> | ||
Reach out to me at{' '} | ||
<Link href={`mailto:${config.supportEmail}`}> | ||
{config.supportEmail} | ||
</Link>{' '} | ||
or join our <Link href={config.discordInviteUrl}>Discord</Link>. | ||
</p> | ||
), | ||
}, | ||
{ | ||
title: 'What is DS Pro about?', | ||
content: ( | ||
<p> | ||
DS Pro is an open source solution to build Design Systems in an easier | ||
and faster way. | ||
<br /> | ||
Think of it as an infrastructure provider that allows designers and | ||
developers to connect and run all the pieces of a design system | ||
together. | ||
</p> | ||
), | ||
}, | ||
{ | ||
title: 'What can I do with DS Pro?', | ||
content: ( | ||
<p> | ||
Currently, DS Pro allows to synchronize your Design Tokens from Figma to | ||
your code repository in GitHub. | ||
<br /> | ||
More integrations are coming soon. Any feedback or suggestions in our{' '} | ||
<Link href={config.feedbackUrl}>feedback board</Link> is highly welcome. | ||
</p> | ||
), | ||
}, | ||
]; | ||
|
||
export default function Home() { | ||
return redirect('/app/integrations'); | ||
return ( | ||
<MainContent | ||
description="DS Pro is in experimental phase. Your data or features might change or get lost with no warning." | ||
title="Welcome 👋" | ||
> | ||
<div className="flex justify-center w-full"> | ||
<Accordion type="single" collapsible className="w-full max-w-screen-md"> | ||
{items.map((item, index) => ( | ||
<AccordionItem value={index.toString()}> | ||
<AccordionTrigger>{item.title}</AccordionTrigger> | ||
<AccordionContent>{item.content}</AccordionContent> | ||
</AccordionItem> | ||
))} | ||
</Accordion> | ||
</div> | ||
</MainContent> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 { MainContent } from '@/components'; | ||
import { fetchReleases } from './_actions'; | ||
import { SelectReleases } from './_components'; | ||
import { getMetadata } from '@/lib/metadata'; | ||
import { Text } from '@ds-project/components'; | ||
|
||
export const metadata = getMetadata({ title: 'Tokens' }); | ||
|
||
export default async function Tokens() { | ||
const releases = await fetchReleases(); | ||
|
||
return ( | ||
<MainContent | ||
description="Inspect the design tokens releases." | ||
title="Releases" | ||
> | ||
{(releases?.length ?? 0) > 0 ? ( | ||
<div className="flex flex-col gap-4"> | ||
<SelectReleases releases={releases} /> | ||
</div> | ||
) : ( | ||
<Text> | ||
<p> | ||
No releases yet. Connect an input and an output to create a release. | ||
</p> | ||
</Text> | ||
)} | ||
</MainContent> | ||
); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { serverEnv } from '@/env/server-env'; | ||
import { unstable_flag as flag } from '@vercel/flags/next'; | ||
export const getShowReleasesFlag = flag({ | ||
key: 'releases-feature', | ||
decide: () => serverEnv.ENABLE_RELEASES_FLAG, | ||
}); |
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
Oops, something went wrong.