Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
avoonix committed Jun 17, 2023
1 parent 998aa79 commit eb85f7e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 30 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/modules/editor/StepDescription.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Well } from "@react-spectrum/well";
import { FC, PropsWithChildren } from "react";

interface Props extends PropsWithChildren {}
type Props = PropsWithChildren;

const StepDescription: FC<Props> = (props) => {
return <Well margin="single-line-height">{props.children}</Well>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { View } from "@adobe/react-spectrum";
import { FC, PropsWithChildren } from "react";

interface Props extends PropsWithChildren {}
type Props = PropsWithChildren;

const StepToolbarContainer: FC<Props> = (props) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/modules/export/AddToSetButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const AddToSetButton: FC<Props> = (props) => {
action: props.action,
});
if (props.action === "save" || props.action === "saveAndAdd") {
router.push(router.asPath.replace(/step\/\d/, "step/4"));
router.push(router.asPath.replace(/step\/\d/, "step/4"));
}
console.log("response", response);
} catch (error: any) {
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/modules/export/generateTgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ export const generateTgs = async (props: Props) => {

console.log("size in KiB", blob.size / (1 << 10));

download(blob, `${props.lottie.name || "sticker"}.tgs`, "application/octet-stream");
download(
blob,
`${props.lottie.name || "sticker"}.tgs`,
"application/octet-stream",
);
};
33 changes: 7 additions & 26 deletions packages/frontend/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import MainLayout from "@/layouts/MainLayout";
import { useUpdateAuthData } from "@/modules/export/auth";
import { themeAtom } from "@/modules/misc/theme";
import ThemeProvider from "@/modules/misc/ThemeProvider";
Expand All @@ -19,6 +20,11 @@ export default function MyApp({ Component, pageProps }: AppProps) {
const { updateAuthData } = useUpdateAuthData();
const router = useRouter();

// Use the layout defined at the page level, if available
const getLayout =
(Component as any).getLayout ||
((page: any) => <MainLayout>{page}</MainLayout>);

useEffect(() => {
if (!router.query.hash) return;
const data = JSON.stringify(
Expand Down Expand Up @@ -49,32 +55,7 @@ export default function MyApp({ Component, pageProps }: AppProps) {
</Head>
<SSRProvider>
<Provider theme={defaultTheme} colorScheme={theme.type} locale="en">
<Component {...pageProps} />
<View padding="size-100">
<a
href="https://github.com/avoonix/tg-sticker-creator/tree/master/packages/frontend"
target="_blank"
rel="noreferrer noopener"
>
sauce
</a>{" "}
&bull;{" "}
<a
href="https://www.gnu.org/licenses/agpl-3.0.en.html"
target="_blank"
rel="noreferrer noopener"
>
code license
</a>{" "}
&bull;{" "}
<a
href="https://creativecommons.org/publicdomain/zero/1.0/"
target="_blank"
rel="noreferrer noopener"
>
template license
</a>
</View>
{getLayout(<Component {...pageProps} />)}
</Provider>
</SSRProvider>
<ThemeProvider />
Expand Down

0 comments on commit eb85f7e

Please sign in to comment.