feat: update sidebar ui

This commit is contained in:
ivannoskov
2026-01-21 10:36:08 +03:00
parent 1f36a074af
commit 0af5cd7458
8 changed files with 214 additions and 160 deletions

View File

@@ -127,7 +127,7 @@ const getCreativeWord = (count: number): string => {
export default function CreativesPage() {
const params = useParams();
const workspaceId = params?.workspaceId as string;
const { selectedProjects, getProjectFilterId, allProjectsSelected, hasPermission } = useWorkspace();
const { selectedProjects, getProjectFilterId, allProjectsSelected, hasPermission, currentProject } = useWorkspace();
const projectFilterId = getProjectFilterId();
const [creatives, setCreatives] = useState<Creative[]>([]);
@@ -613,22 +613,25 @@ export default function CreativesPage() {
<li>Креатив автоматически отобразится на платформе</li>
</ol>
</div>
<div className="flex justify-end gap-2 pt-2">
<Button
variant="outline"
onClick={() => setShowCreateDialog(false)}
>
Понятно
</Button>
<Button
onClick={() => {
window.open(`https://t.me/${BOT_USERNAME}`, "_blank");
setShowCreateDialog(false);
}}
>
Открыть бота
</Button>
</div>
<div className="flex justify-end gap-2 pt-2">
<Button
variant="outline"
onClick={() => setShowCreateDialog(false)}
>
Понятно
</Button>
<Button
onClick={() => {
const botUrl = currentProject
? `https://t.me/${BOT_USERNAME}?start=project_${currentProject.id}_createcreative`
: `https://t.me/${BOT_USERNAME}`;
window.open(botUrl, "_blank");
setShowCreateDialog(false);
}}
>
Открыть бота
</Button>
</div>
</div>
</DialogContent>
</Dialog>