-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use zustand instead of react context (#27)
* feat: create zoom store instead of context * feat: add images store * refactor: use shared layout * refactor: create elements store instead of context * feat: add undo/redo with zundo * refactor: export & show image/template name
- Loading branch information
Showing
35 changed files
with
644 additions
and
603 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
import { Suspense } from "react"; | ||
import { OgSplash } from "../../components/OgSplash"; | ||
import { MyImagesSplash } from "../../components/Splash/MyImagesSplash"; | ||
|
||
export const metadata = { | ||
title: 'My images - OG Studio', | ||
description: 'My Open Graph images.', | ||
} | ||
|
||
export default function MyImages() { | ||
return ( | ||
// OgSplash uses `useSearchParams()` so we need to wrap it in a Suspense | ||
// to allow to statically render the page: https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-functions | ||
<Suspense> | ||
<OgSplash route="my-images" /> | ||
</Suspense> | ||
) | ||
return <MyImagesSplash /> | ||
} |
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,17 +1,10 @@ | ||
import { Suspense } from "react"; | ||
import { OgSplash } from "../components/OgSplash"; | ||
import { HomeSplash } from "../components/Splash/HomeSplash"; | ||
|
||
export const metadata = { | ||
title: 'OG Studio', | ||
description: 'Figma-like OG (Open Graph) Image builder.', | ||
} | ||
|
||
export default function Home() { | ||
return ( | ||
// OgSplash uses `useSearchParams()` so we need to wrap it in a Suspense | ||
// to allow to statically render the page: https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-functions | ||
<Suspense> | ||
<OgSplash route="splash" /> | ||
</Suspense> | ||
) | ||
return <HomeSplash /> | ||
} |
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,17 +1,10 @@ | ||
import { Suspense } from "react"; | ||
import { OgSplash } from "../../components/OgSplash"; | ||
import { TemplatesSplash } from "../../components/Splash/TemplatesSplash"; | ||
|
||
export const metadata = { | ||
title: 'Templates - OG Studio', | ||
description: 'Pre-made Open Graph image templates.', | ||
} | ||
|
||
export default function Templates() { | ||
return ( | ||
// OgSplash uses `useSearchParams()` so we need to wrap it in a Suspense | ||
// to allow to statically render the page: https://nextjs.org/docs/app/building-your-application/rendering/server-components#dynamic-functions | ||
<Suspense> | ||
<OgSplash route="templates" /> | ||
</Suspense> | ||
) | ||
return <TemplatesSplash /> | ||
} |
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 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
17 changes: 13 additions & 4 deletions
17
apps/dashboard/src/components/LeftPanel/ModificationsSection.tsx
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.