Ручные правки
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
import { FC } from 'react';
|
||||
import { TemplateManager } from '../../../../components/TemplateManager/TemplateManager';
|
||||
import { FC, useEffect } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { TemplateManager } from '../../../../components/TemplateManager/TemplateManager'
|
||||
import { useTemplateContext } from '../../../../contexts/TemplateContext'
|
||||
|
||||
export const TemplateSetup: FC = () => {
|
||||
return <TemplateManager />;
|
||||
};
|
||||
const { templateId } = useParams<{ templateId: string }>()
|
||||
const { templates } = useTemplateContext()
|
||||
|
||||
useEffect(() => {
|
||||
if (templateId) {
|
||||
const template = templates.find((t) => t.id === templateId)
|
||||
if (template) {
|
||||
console.log('Opening template for editing:', template)
|
||||
}
|
||||
}
|
||||
}, [templateId, templates])
|
||||
|
||||
return <TemplateManager templateId={templateId} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user