feat: update sidebar ui
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user