diff --git a/src/components/TemplateSettings.jsx b/src/components/TemplateSettings.jsx
index d23a255..545393b 100644
--- a/src/components/TemplateSettings.jsx
+++ b/src/components/TemplateSettings.jsx
@@ -96,85 +96,83 @@ const TemplateSettings = () => {
-
- {list.map(({
- enabled, imageId, canvasId, title, x, y, width, height,
- }, index) => (editingIndices.includes(index) ? (
-
- ) : (
-
- )))}
- {showAdd && }
- {(showAdd) ? (
- close()}
- > {t`Cancel adding Template`}
- ) : (
- setShowAdd(true)}
- > {t`Add Template`}
- )}
- {(list.some((z) => z.enabled)) && (
-
- |
- {
- const data = await templateLoader.exportEnabledTemplates();
- if (data) {
- fileDownload(
- JSON.stringify(data), 'PixelplanetTemplates.json',
- );
- }
- }}
- >{t`Export enabled templates`}
-
- )}
- |
+ {list.map(({
+ enabled, imageId, canvasId, title, x, y, width, height,
+ }, index) => (editingIndices.includes(index) ? (
+
+ ) : (
+
+ )))}
+ {showAdd && }
+ {(showAdd) ? (
importRef.current?.click()}
- >{t`Import templates`}
- {
- templateLoader.importTemplates(evt.target.files?.[0]);
- }}
- />
-
+ onClick={() => close()}
+ > {t`Cancel adding Template`}
+ ) : (
+ setShowAdd(true)}
+ > {t`Add Template`}
+ )}
+ {(list.some((z) => z.enabled)) && (
+
+ |
+ {
+ const data = await templateLoader.exportEnabledTemplates();
+ if (data) {
+ fileDownload(
+ JSON.stringify(data), 'PixelplanetTemplates.json',
+ );
+ }
+ }}
+ >{t`Export enabled templates`}
+
+ )}
+ |
+ importRef.current?.click()}
+ >{t`Import templates`}
+ {
+ templateLoader.importTemplates(evt.target.files?.[0]);
+ }}
+ />
>
);
};